Skip to content

nudge 0.5.1

Latest

Choose a tag to compare

@HongtaoYang HongtaoYang released this 13 Nov 03:00
· 14 commits to main since this release
1834672

Relay connections now survive laptop sleep: dead connections are detected within about a minute, and --connect sessions reconnect by themselves.

Highlights

  • --connect reconnects automatically. If the relay connection drops (for example while the laptop sleeps), the TUI shows "relay connection lost — reconnecting…", redials with backoff, and replays only the events you missed. Input typed during the outage is sent once it reconnects.
  • Dead connections are detected. Clients and the relay now exchange keepalive pings every 20s and treat 60s of silence as a dead connection. A peer that sleeps or disappears is reaped and dropped from /peers instead of lingering indefinitely.
  • No more "Connection reset without closing handshake" on /connect-peer. The relay now reads connections waiting to be paired and drops dead ones, so a client is never paired with a session that went away.
  • Stale pairing codes are flagged. If reconnecting keeps failing for about 2 minutes, nudge suggests the session may have restarted and its pairing code changed.

Upgrade notes

  • Self-hosted relays: upgrade the relay first, then the clients. Download relay from this release and restart your relay service. A 0.5.1 client against an older relay repeatedly replaces its waiting connection, and the old relay keeps the dead ones around. The new relay keeps 0.5.0 clients working, so upgrading it first is safe. The shared relay is already upgraded.
  • Restarting the relay drops all open connections. Sessions running nudge --daemon reconnect on their own. Older --connect TUIs and peer links need restarting.
  • Peer links are detected but not yet reconnected: re-run /connect-peer with the same code (#62). A message sent to a peer in the up-to-60s window before a dead link is detected can be lost.