Closed mtharrison closed 6 years ago
Thanks. I suppose this closes https://github.com/hapijs/nes/issues/240 too?
Yes, I referenced the PR by mistake. Thanks.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
This hook notifies user immediately when a disconnection is initiated due to heartbeat timeout, so they can take action. Previously the only option was to wait for
onDisconnection
which isn't called until server close frame is received. This leaves a gap between the timeout and disconnection proper when the client is unaware that the connection is not usable.In future we may make more radical changes to the hooks, such as calling
onDisconnect()
as soon as the timeout occurs but this is a simple backwards-compatible change that addresses the issue.Closes #241
cc @dominykas