]> git.bitcoin.ninja Git - rapid-gossip-sync-server/commitdiff
Delay prior to reconnecting peers that have disconnected
authorMatt Corallo <git@bluematt.me>
Tue, 28 Feb 2023 18:14:22 +0000 (18:14 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 15 Mar 2023 17:52:43 +0000 (17:52 +0000)
src/tracking.rs

index ebe04134a91d43e42d284459404a83a5898008d6..243590765f1e829e750d6c6dc0cc68b07687a1c1 100644 (file)
@@ -161,9 +161,8 @@ async fn connect_peer(current_peer: (PublicKey, SocketAddr), peer_manager: Gossi
                                        current_peer.1,
                                ).await {
                                        disconnection_future.await;
-                               } else {
-                                       tokio::time::sleep(Duration::from_secs(10)).await;
                                }
+                               tokio::time::sleep(Duration::from_secs(10)).await;
                        }
                });
                true