diff options
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.rs b/src/state.rs index dd360de..3ce30d1 100644 --- a/src/state.rs +++ b/src/state.rs @@ -177,7 +177,7 @@ impl PeerState { /// openings cross, and each side answers the other's: harmless between peers that /// share history, but an empty peer answers with empty heads, which Automerge takes /// for "lost everything", so the whole document goes out a second time. Only the - /// side with the smaller key opens; the other waits for its opening, up to + /// side that leads the pair (`swarm::pair`) opens; the other waits for its opening, up to /// `SYNC_OPENING_GRACE`. Returns how much longer to wait, if at all. pub(crate) fn opening_wait(&self, we_open: bool, now: Instant) -> Option<Duration> { if we_open || self.sync_state.their_heads.is_some() { @@ -276,7 +276,7 @@ impl PeerState { /// True (and records the ping) if an established, quiet peer needs a keepalive. /// /// One PING and its PONG tell both sides that the other is alive, so only one side of - /// a pair needs to ping: the one with the smaller key (`we_ping`). Each of its PINGs + /// a pair needs to ping: the one leading the pair (`we_ping`, `swarm::pair`). Each of its PINGs /// makes the other side's peer look recently heard from, so the other side never /// pings while it does. If the pings stop, the other side pings once it has heard /// nothing for half an interval more. Without that, both sides would get due at about |
