Saved SSH machine takes 30 s or more to reconnect after opening a MacBook lid, sometimes never
Is this a reproducible bug?
- I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.
- I reproduced this bug on the version and environment reported below using the exact steps provided.
Current behavior
After I close my MacBook Air's lid for a while and then open it, my saved SSH machine (added with herdr machine add) takes a long time to come back. Sometimes it's 15 to 30 seconds. Sometimes it doesn't come back at all until I restart the client. Once the client logged the connection as lost, and 60 seconds later it still hadn't reconnected, even though the lid had been open for 13 of those seconds. I quit and relaunched herdr, and it connected about 11 seconds later. The best case I saw was about 5 seconds.
Expected behavior
Once the lid is open and the network is back, the saved machine reconnects within a few seconds without me restarting the client.
Reproduction
- On a MacBook running on battery with Power Nap on (default
pmset), save a Linux host withherdr machine addand switch to it. - Close the lid for 30 minutes or more. During that time the Mac does its usual periodic maintenance wakes.
- Open the lid and time how long until the saved machine's view is live again.
Impact
I can't close the laptop and pick my remote session back up right away. I usually end up restarting the herdr client instead of waiting.
Environment
- Herdr version: 0.9.1 on both ends
- Update channel (stable or preview): stable
- Operating system: client on macOS (MacBook Air), server on Fedora Linux 44 (bootc)
- Terminal: Ghostty
- Shell, if relevant: bash
- Relevant config, if any: saved machine over Tailscale SSH; no
[remote]section in config.toml
Client log (UTC). The lid opened at 23:35:48, 23:41:57, and 01:23:03:
23:35:01 WARN endpoint transport failed endpoint=ssh:44f0… error=connection was lost
23:36:01 INFO herdr exiting (I gave up and restarted the client)
23:36:03 INFO herdr starting
23:42:11 WARN endpoint transport failed endpoint=ssh:44f0… error=endpoint health check timed out
23:42:27 INFO endpoint handshake succeeded (about 30 s after the lid opened)
01:23:06 WARN saved SSH endpoint bridge failed error=ssh bridge exited with exit status: 1
01:23:08 INFO endpoint handshake succeeded (about 5 s after the lid opened)Source: herdrdev/herdr