summaryrefslogtreecommitdiffstats
path: root/src/swarm/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm/sync.rs')
-rw-r--r--src/swarm/sync.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index 91c6eee..1335361 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -63,8 +63,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str, retry_delivery: bool
};
if !retry_delivery {
- let we_open = crate::swarm::pair::leads(state.local_id(), peer);
- if let Some(wait) = peer_state.opening_wait(we_open, Instant::now()) {
+ if let Some(wait) = peer_state.sync.opening_wait(Instant::now()) {
trace!(
wait_ms = wait.as_millis(),
"Leaving the opening sync message to the peer"
@@ -149,10 +148,6 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str, retry_delivery: bool
.collect();
peer_state.sync.expect_reply(sent, Instant::now());
}
- if message.is_some() {
- // It carries our epoch.
- peer_state.epoch_unannounced = false;
- }
(epoch, message)
};
let Some(message) = message else {