From e59be99401fc4b50f1b4f5a6a16948959e5c56a1 Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Thu, 6 Oct 2022 16:44:01 +0200 Subject: [PATCH] fix(p2p/liveness): remove fallible unwrap (#4784) Description --- Removed stray unwrap in liveness service Motivation and Context --- Caused a base node to panic in stress test conditions. ``` thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: DhtOutboundError(RequesterReplyChannelClosed)', base_layer\p2p\src\services\liveness\service.rs:164:71 ``` How Has This Been Tested? --- Tests pass --- base_layer/p2p/src/services/liveness/service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_layer/p2p/src/services/liveness/service.rs b/base_layer/p2p/src/services/liveness/service.rs index def15f5116..5da92ad100 100644 --- a/base_layer/p2p/src/services/liveness/service.rs +++ b/base_layer/p2p/src/services/liveness/service.rs @@ -161,7 +161,7 @@ where match ping_pong_msg.kind().ok_or(LivenessError::InvalidPingPongType)? { PingPong::Ping => { self.state.inc_pings_received(); - self.send_pong(ping_pong_msg.nonce, public_key).await.unwrap(); + self.send_pong(ping_pong_msg.nonce, public_key).await?; self.state.inc_pongs_sent(); debug!(