From 85fdf9220aecaedc0a5254f18e7315cbf731c7b7 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#53 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 b9bd25c52ea5..af7a55a13bd2 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 => {