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.
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.
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