aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/peers.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/peers.md b/docs/peers.md
index 13ee85d..f19e699 100644
--- a/docs/peers.md
+++ b/docs/peers.md
@@ -248,6 +248,13 @@ stateDiagram-v2
once, whatever our phase; it isn't counted as an incident (`dormancies`). What that
run still sends while it stops (sync messages, PINGs, a LINKS_REPLY) doesn't make it
active again: only a HELLO or HELLO_REPLY from its next run does.
+- **A suspended machine** (a laptop asleep) counts its peers as silent for as long as it
+ slept: the monotonic clock the timers run on stops meanwhile, so without that every
+ peer would look heard from minutes ago on waking. The peer worker compares it with a
+ clock that runs on (`/proc/uptime` on Linux, the wall clock elsewhere) on every pass
+ ([`swarm/suspend.rs`](../src/swarm/suspend.rs)); a gap of 30 s or more ages when each
+ peer was last heard from, so those silent longer than `dormant_after` become dormant
+ and are greeted again, and the time counts as not connected for the node's stability.
- **Strangers** (peers that never became members: listed to us but never answering, or
failing the handshake) are forgotten locally once silent for a day, so peers named
to a node can't grow its list without bound.