Skip to content

Commit

Permalink
fix(p2p/liveness): remove fallible unwrap (#4784)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sdbondi authored Oct 6, 2022
1 parent f6043c1 commit e59be99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base_layer/p2p/src/services/liveness/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit e59be99

Please sign in to comment.