Skip to content

Commit

Permalink
fix(ping): Fixes panic in WASM caused by retrying on dail errors
Browse files Browse the repository at this point in the history
This PR workarounds async-rs/futures-timer#53 issue.

Fixes libp2p#5442
  • Loading branch information
oblique committed Jun 6, 2024
1 parent 8f42576 commit 85fdf92
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions protocols/ping/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ impl Handler {
>,
) {
self.outbound = None; // Request a new substream on the next `poll`.
self.interval.reset(Duration::new(0, 0));

let error = match error {
StreamUpgradeError::NegotiationFailed => {
Expand Down

0 comments on commit 85fdf92

Please sign in to comment.