From 7b8185aec034a4af3ac538db2c15df3cb98f9275 Mon Sep 17 00:00:00 2001 From: Yiannis Marangos Date: Thu, 6 Jun 2024 15:10:14 +0300 Subject: [PATCH] fix(ping): Fixes panic in WASM caused by retrying on dail errors This PR workarounds async-rs/futures-timer#74 issue. Fixes #5442 --- protocols/ping/src/handler.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/protocols/ping/src/handler.rs b/protocols/ping/src/handler.rs index b9bd25c52ea..af7a55a13bd 100644 --- a/protocols/ping/src/handler.rs +++ b/protocols/ping/src/handler.rs @@ -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 => {