I am developing the application using nodejs socket. The client get connected to the server when the page is loaded. The connection is established to the server successfully. when the browser is closed or refreshed the disconnect event is fired in the server. but when i explicitly called the disconnect i.e socket.disconnect() from the client side the disconnect event is fired in the server and the connection is reconnected with the server. after that when i refresh or closed the browser the disconnect event is not firing on the server side.
Why disconnect event is firing when the browser is closed or refreshed?
Aucun commentaire:
Enregistrer un commentaire