projects
/
rapid-gossip-sync-server
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0ff0a2a
)
Always wait 10 seconds prior to attempting reconnection.
author
Arik Sosman
<git@arik.io>
Wed, 6 Sep 2023 23:26:59 +0000
(16:26 -0700)
committer
Arik Sosman
<git@arik.io>
Wed, 6 Sep 2023 23:26:59 +0000
(16:26 -0700)
src/tracking.rs
patch
|
blob
|
history
diff --git
a/src/tracking.rs
b/src/tracking.rs
index d25b60a665b93277ae0c1d4bbf83ec17c58cb4e2..2f1e3b32d7bef336b58db16f9756b27af554b1dd 100644
(file)
--- a/
src/tracking.rs
+++ b/
src/tracking.rs
@@
-181,15
+181,16
@@
async fn connect_peer<L: Deref + Clone + Send + Sync + 'static>(current_peer: (P
sender.send(true).await.unwrap();
}
disconnection_future.await;
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 {
} 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;
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());
}
});
}
});