relay link: ping every 30 s, reconnect after two missed pongs #257

Merged
jcoffey-dev merged 1 commits from relay/link-keepalive into main 2026-10-30 13:15:37 +00:00
Owner

Brings the link's keepalive in line with RL-5 in the relay spec. Until now the downstream relied on its 15-second sync and the 60-second call timeout to notice a dead link.

  • The downstream sends a WebSocket ping every 30 seconds, so NAT and firewalls keep the connection open.
  • If two pongs go missing, it drops the link and reconnects.
  • Reconnect backoff now runs from 1 s up to 60 s (it was 5 s to 120 s).
  • Missed ping ticks are delayed, not burst, so a long call can't count as missed pongs.

The relay already answered pings, so nothing changes on that side.

Tests: system::relay::relay_link_tests passes; it runs past the first ping. fmt, clippy and the fork checks are clean. No test drops pongs on purpose, because the relay's WebSocket stack answers pings by itself.

Brings the link's keepalive in line with RL-5 in the relay spec. Until now the downstream relied on its 15-second sync and the 60-second call timeout to notice a dead link. - The downstream sends a WebSocket ping every 30 seconds, so NAT and firewalls keep the connection open. - If two pongs go missing, it drops the link and reconnects. - Reconnect backoff now runs from 1 s up to 60 s (it was 5 s to 120 s). - Missed ping ticks are delayed, not burst, so a long call can't count as missed pongs. The relay already answered pings, so nothing changes on that side. Tests: `system::relay::relay_link_tests` passes; it runs past the first ping. fmt, clippy and the fork checks are clean. No test drops pongs on purpose, because the relay's WebSocket stack answers pings by itself.
jcoffey-dev added 1 commit 2026-10-30 07:18:24 +00:00
relay link: ping every 30 s, reconnect after two missed pongs
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 9m7s
8992a97579
Matches RL-5: the downstream pings the relay every 30 seconds so NAT and
firewalls keep the link open, and reconnects once two pongs go missing.
Backoff now runs from 1 s up to 60 s.
jcoffey-dev merged commit 0d3d7e19f6 into main 2026-10-30 13:15:37 +00:00
jcoffey-dev deleted branch relay/link-keepalive 2026-10-30 13:15:37 +00:00
Sign in to join this conversation.