When a webapp reloads, the server has to detect the close of the connection and update its directory structure. Chrome does not seem to send a close frame. Firefox does.
Also, the messages are not being removed properly on disconnect.
The Workaround
adding new close() to NetSocket method to be called by disconnectAsClient()
ensure that server detects the correct disconnection event and calls removeClient()
use beforeunload to call Endpoint.disconnectAsClient() in browser client
The Problem
When a webapp reloads, the server has to detect the close of the connection and update its directory structure. Chrome does not seem to send a close frame. Firefox does.
Also, the messages are not being removed properly on disconnect.
The Workaround
close()
toNetSocket
method to be called bydisconnectAsClient()
removeClient()
beforeunload
to callEndpoint.disconnectAsClient()
in browser client