Skip to content

fix: bound Realm control connections to recover after WAN changes - #1694

Open
mvanhorn wants to merge 1 commit into
HyNetworks:masterfrom
mvanhorn:fix/1637-realm-wan-recovery
Open

mvanhorn wants to merge 1 commit into
HyNetworks:masterfrom
mvanhorn:fix/1637-realm-wan-recovery

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

One registration call is limited to 10 seconds, and each heartbeat and the events stream, including body reads, are limited to the session TTL, so a stalled control connection fails into the existing backoff and re-register path. An events stream that reaches that deadline while the session is still live is renewed, and failures that continue past the TTL end the session. After the WAN address changes, a realm server that is still running leaves its previous public endpoint registered with the coordination server. Clients can still resolve the realm, then time out against that endpoint until the process is restarted and registration runs again.

Gofmt reports the edited server files as already formatted. go vet ./cmd/... reports no issues.

Closes #1637

One registration call is limited to 10 seconds, and each heartbeat and
the events stream, including body reads, are limited to the session TTL,
so a stalled control connection fails into the existing backoff and
re-register path. An events stream that reaches that deadline while the
session is still live is renewed, and failures that continue past the
TTL end the session. After a session is canceled, both control loops are
drained before the next session starts, and a canceled parent context
stops the loops as shutdown. A unit test withholds the heartbeat
response until the attempt context ends and requires the loop to report
session loss.

Fixes HyNetworks#1637

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realm无法在服务端ip变更时重新注册

1 participant