mirror of
https://github.com/go-gost/x.git
synced 2026-10-20 08:18:33 +00:00
A hub that refuses a spoke registration (bad passphrase, allowlist, self-loop) used to stay silent and keep the stream: the spoke sat 'running' with zero traffic and nothing to look at. Return ErrRegistrationRefused instead so the stream is torn down — the spoke redials and re-registers, which also recovers on its own once the hub is fixed. Malformed frames and bare echoes still return nil and leave the stream up, so transport noise cannot turn into a reconnect storm. Without a keepalive period the client reader had no deadline at all and waited forever on a silent link. Bound it with a 30s first-inbound one-shot (firstInboundTimeout, cleared by any inbound byte); the keepalive>0 path is untouched.