diff options
Diffstat (limited to 'src/swarm/source.rs')
| -rw-r--r-- | src/swarm/source.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/swarm/source.rs b/src/swarm/source.rs index 9eac445..b1701b3 100644 --- a/src/swarm/source.rs +++ b/src/swarm/source.rs @@ -23,7 +23,10 @@ //! `Timing::delivery_limit`, after which Mycelium has delivered or dropped anything it //! sent before. It isn't chosen again for another `delivery_limit`, so another peer //! takes over rather than the same one stalling again; if it is the only candidate, -//! catching up waits that long before trying it again. Meanwhile, every minute without a sync message from it is logged as a +//! catching up waits that long before trying it again. It also gets a fresh HELLO: a +//! joining node learns of other peers only from HELLO_REPLYs, and the one it got from +//! this peer may have listed none (a peer lists only its neighbours, which a new member +//! isn't until its registration has spread). Meanwhile, every minute without a sync message from it is logged as a //! warning. use std::sync::atomic::Ordering; @@ -203,6 +206,8 @@ pub(crate) fn reply_timed_out(state: &AppState, peer: &str) { "Catch-up source doesn't answer our sync messages; catching up from another peer" ); resync_everyone(state); + let (state, peer) = (state.clone(), peer.to_owned()); + tokio::spawn(async move { crate::swarm::peer::rehandshake(&state, &peer).await }); } } |
