lokinet icon indicating copy to clipboard operation
lokinet copied to clipboard

handle suspend properly

Open majestrate opened this issue 5 years ago • 2 comments

currently when the event loop jumps ahead a large amount i.e. when after suspending the daemon needs to restart fully.

majestrate avatar May 14 '19 12:05 majestrate

I don't think the event loop will jump ahead by a large amount because I think (?) it's driven by the monotonic clock, which doesn't advance during sleep (at least on Linux, and I assume something similar on Win/Mac).

That, however, suggests a heuristic: we can periodically (e.g. once/second) check the system clock and if we see a big jump there, reset state/paths/invalidate connections/whatever we need to do to get us back to "let's make some paths" status.

jagerman avatar Aug 26 '21 01:08 jagerman

Appears to be the same anticipated behavior I have with Fedora on a MacBook Pro. Leaving it to it's own to reconnect has taken up to 10 minutes after sleep. It will eventually build paths but I restart the daemon to kick it into action.

necro-nemesis avatar Aug 26 '21 15:08 necro-nemesis