Previously we used the wall clock via Unix.gettimeofday() to compute the idle time for "endpoints" (remote destinations). When a laptop wakes from sleep, the wall clock jumps forward and suddenly all the endpoints are idle and the connections are dropped.
This patch switches to a monotonic clock which is driven by a CPU counter. The counter is paused while the computer sleeps and therefore does not jump forwards on wake.
This patch also adds a log message whenever an "endpoint" is deleted, to make debugging problems easier.
Previously we used the wall clock via
Unix.gettimeofday()
to compute the idle time for "endpoints" (remote destinations). When a laptop wakes from sleep, the wall clock jumps forward and suddenly all the endpoints are idle and the connections are dropped.This patch switches to a monotonic clock which is driven by a CPU counter. The counter is paused while the computer sleeps and therefore does not jump forwards on wake.
This patch also adds a log message whenever an "endpoint" is deleted, to make debugging problems easier.
Signed-off-by: David Scott dave@recoil.org