aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-06 04:34:23 +0100
committertv <tv@krebsco.de>2026-11-06 04:34:23 +0100
commitd6f6c2e020ac648b54c0e024596460ffb82ca437 (patch)
treed2b35b071b8f2f878ab333bf39d169c14015d7d1 /docs
parentb4d0f3d9671c3bac8fd3c4b6c3f5f75196a06742 (diff)
suspend detected
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.