aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer/keepalive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm/peer/keepalive.rs')
-rw-r--r--src/swarm/peer/keepalive.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/swarm/peer/keepalive.rs b/src/swarm/peer/keepalive.rs
index 4b529f5..9037fdd 100644
--- a/src/swarm/peer/keepalive.rs
+++ b/src/swarm/peer/keepalive.rs
@@ -120,7 +120,7 @@ pub(crate) fn announce(state: &AppState) {
/// catching up from us picks another source now, instead of once we go dormant. Bounded
/// in time: our transport may be gone already.
pub(crate) async fn farewell(state: &AppState) {
- state.stopping.store(true, Ordering::Release);
+ state.closing.send_replace(true);
info!("Saying farewell to our neighbours");
status_to_neighbours(state, Some(FAREWELL_TIMEOUT)).await;
}
@@ -145,9 +145,9 @@ pub(crate) async fn local_status(state: &AppState, peer: &str) -> transport::Sta
heads,
epoch,
epoch_seq,
- ready: state.is_ready().await && !state.stopping.load(Ordering::Acquire),
+ ready: state.is_ready().await && !state.is_closing(),
syncs_with_you,
- leaving: state.stopping.load(Ordering::Acquire),
+ leaving: state.is_closing(),
}
}