From 7db59c550ff106642d2756cdf8422bfd5e6936ea Mon Sep 17 00:00:00 2001 From: Gabriel Souza Franco Date: Thu, 27 May 2021 13:59:40 -0300 Subject: [PATCH] fix: also return successful PDUs in /send/:txnId --- src/server_server.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/server_server.rs b/src/server_server.rs index 51b3fb66..7903d8ae 100644 --- a/src/server_server.rs +++ b/src/server_server.rs @@ -628,19 +628,20 @@ pub async fn send_transaction_message_route<'a>( }; let start_time = Instant::now(); - if let Err(e) = handle_incoming_pdu( - &body.origin, - &event_id, - value, - true, - &db, - &pub_key_map, - &mut auth_cache, - ) - .await - { - resolved_map.insert(event_id.clone(), Err(e)); - } + resolved_map.insert( + event_id.clone(), + handle_incoming_pdu( + &body.origin, + &event_id, + value, + true, + &db, + &pub_key_map, + &mut auth_cache, + ) + .await + .map(|_| ()), + ); let elapsed = start_time.elapsed(); if elapsed > Duration::from_secs(1) {