summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/state.rs b/src/state.rs
index 3abfd85..46a29d4 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -137,9 +137,6 @@ pub(crate) struct SyncSession {
pub(crate) reply: Option<SyncReplyWait>,
/// How long to wait for it; doubles while answers stay out.
pub(crate) reply_timeout: Duration,
-
- /// Consecutive exchanges that changed nothing (livelock detection).
- pub(crate) stalled_exchanges: u32,
}
/// Sync messages we sent and expect an answer to. Automerge assumes reliable delivery:
@@ -165,7 +162,6 @@ impl SyncSession {
outbound: None,
reply: None,
reply_timeout: SYNC_REPLY_TIMEOUT,
- stalled_exchanges: 0,
}
}
@@ -320,19 +316,6 @@ impl PeerState {
due
}
- /// Schedules a fresh handshake, which resets sync on both sides: the peer resets on
- /// our HELLO, we reset on its reply. The peer worker sends the HELLO on its next tick.
- /// Usable without awaiting (e.g. under a blocking lock).
- pub(crate) fn request_resync(&mut self) {
- if matches!(self.hello_state, HelloState::Sending { .. }) {
- return; // a HELLO is already on its way
- }
- self.hello_state = HelloState::AwaitingReply {
- next_attempt: Instant::now(),
- next_delay: Duration::from_millis(500),
- };
- }
-
/// Self-healing check on PING/PONG. Returns true if a re-handshake should start.
pub(crate) fn needs_heal(
&mut self,