keithw/mosh — pull request #263 by kmcallister (2012-05-05 06:26:33+00:00)
Title: Decrease wakeup frequency for disconnected clients

Mosh sends heartbeat packets every 3 seconds, but

* we retry every 200 ms if `sendto` returns an error, and
* we also update the UI every second.

This patchset fixes both issues, decreasing power consumption. A disconnected `mosh-client` will only wake up every 3 s in the steady state (we still update the UI every second for the first 60). Power consumption of 16 disconnected `mosh-client`s is now negligible.

Fixes #243.