Skip to content

Commit 7b8185a

Browse files
committed
fix(ping): Fixes panic in WASM caused by retrying on dail errors
This PR workarounds async-rs/futures-timer#74 issue. Fixes libp2p#5442
1 parent 8f42576 commit 7b8185a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

protocols/ping/src/handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ impl Handler {
183183
>,
184184
) {
185185
self.outbound = None; // Request a new substream on the next `poll`.
186+
self.interval.reset(Duration::new(0, 0));
186187

187188
let error = match error {
188189
StreamUpgradeError::NegotiationFailed => {

0 commit comments

Comments
 (0)