From 9704383248bad692ba3e10dad640b52bf40b902d Mon Sep 17 00:00:00 2001 From: David Estes Date: Tue, 2 Jul 2024 16:03:11 -0500 Subject: [PATCH 1/2] fix: reset start time after calculating redial backoff --- p2p/src/behaviour/ceramic_peer_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/src/behaviour/ceramic_peer_manager.rs b/p2p/src/behaviour/ceramic_peer_manager.rs index 854a58299..26753e0c7 100644 --- a/p2p/src/behaviour/ceramic_peer_manager.rs +++ b/p2p/src/behaviour/ceramic_peer_manager.rs @@ -267,8 +267,8 @@ impl CeramicPeer { } fn start_redial(&mut self) { - self.dial_backoff.reset(); let next_backoff = self.dial_backoff.next_backoff(); + self.dial_backoff.reset(); self.update_dial_future(next_backoff); } From 543c4121939bd6ac57521fa36f9baa827d8fe5c6 Mon Sep 17 00:00:00 2001 From: David Estes Date: Tue, 2 Jul 2024 16:13:46 -0500 Subject: [PATCH 2/2] fix: stop resetting exponential backoff --- p2p/src/behaviour/ceramic_peer_manager.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/p2p/src/behaviour/ceramic_peer_manager.rs b/p2p/src/behaviour/ceramic_peer_manager.rs index 26753e0c7..1bf766748 100644 --- a/p2p/src/behaviour/ceramic_peer_manager.rs +++ b/p2p/src/behaviour/ceramic_peer_manager.rs @@ -268,12 +268,10 @@ impl CeramicPeer { fn start_redial(&mut self) { let next_backoff = self.dial_backoff.next_backoff(); - self.dial_backoff.reset(); self.update_dial_future(next_backoff); } fn stop_redial(&mut self) { - self.dial_backoff.reset(); self.update_dial_future(None); }