hapijs / nes

WebSocket adapter plugin for hapi routes
Other
502 stars 87 forks source link

Call onDisconnect() immediately upon heartbeat timeout #241

Closed mtharrison closed 6 years ago

mtharrison commented 6 years ago

When passing onDisconnect() handler to Nes, a user wants to be notified as soon as the client is considered disconnected, so they can notify the user and stop sending data.

The underlying websocket connection is not technically disconnected until the close frame is received, but if we're forcing a close from the client side, such as when our heartbeat timer times out, we should notify the consumer immediately so they can take action. The close frame may take some time to arrive when there are network connectivity issues.

Closes #240

mtharrison commented 6 years ago

Closed in favour of #243

lock[bot] commented 4 years ago

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.