X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Ftracking.rs;h=2f1e3b32d7bef336b58db16f9756b27af554b1dd;hb=42f64e6208fb2e91d9d5012b5662e3b65721367f;hp=d25b60a665b93277ae0c1d4bbf83ec17c58cb4e2;hpb=0ff0a2a8a0530b185a6094fff7094dced137a862;p=rapid-gossip-sync-server diff --git a/src/tracking.rs b/src/tracking.rs index d25b60a..2f1e3b3 100644 --- a/src/tracking.rs +++ b/src/tracking.rs @@ -181,15 +181,16 @@ async fn connect_peer(current_peer: (P sender.send(true).await.unwrap(); } disconnection_future.await; - log_warn!(logger, "Disconnected from peer {}@{}...", current_peer.0.to_hex(), current_peer.1.to_string()); - tokio::time::sleep(Duration::from_secs(10)).await; - log_warn!(logger, "Reconnecting to peer {}@{}...", current_peer.0.to_hex(), current_peer.1.to_string()); + log_warn!(logger, "Disconnected from peer {}@{}", current_peer.0.to_hex(), current_peer.1.to_string()); } else { + log_warn!(logger, "Failed to connect to peer {}@{}!", current_peer.0.to_hex(), current_peer.1.to_string()); if is_first_iteration { sender.send(false).await.unwrap(); } } is_first_iteration = false; + tokio::time::sleep(Duration::from_secs(10)).await; + log_warn!(logger, "Reconnecting to peer {}@{}...", current_peer.0.to_hex(), current_peer.1.to_string()); } });