mirror of
https://github.com/henrygd/beszel.git
synced 2026-10-21 22:02:34 +00:00
The keepalive ping on a failed fetch re-arms the read deadline without needing a reply, so a dead peer (power loss, partition) kept its connection until TCP gave up. Track when the agent last sent a message and only ping while that is under maxAgentSilence (3m). A live agent always answers within interval + its own 120s deadline, so slow agents are unaffected; a dead one is now released by the read deadline and falls back through the normal down/SSH path.