socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

disconnect event triggered after client reconnects with websocket

Open desheikh opened this issue 15 years ago • 5 comments

Tested this on chrome 13.0782.55

If the client send a disconnect and reconnects after, a disconnect event is triggered shortly after when using websocket as a transport.

socket = io.connect('http://localhost', {reconnect:false}); socket.disconnect(); socket.socket.connect();

desheikh avatar Jul 17 '11 06:07 desheikh

Is the disconnect triggered on the client side or on the server side?

3rd-Eden avatar Jul 23 '11 18:07 3rd-Eden

Both sides register the disconnect event, but I'm not quite sure which on triggers it.

desheikh avatar Jul 23 '11 20:07 desheikh

I think I got a idea what is triggering this, we have close timeout after this timeout the disconnect is fired. But it shouldn't fire when you connect again... So that is a bug.

3rd-Eden avatar Aug 08 '11 19:08 3rd-Eden

I think this basically the same as #425. Any possible workarounds other than disabling websockets as a transport?

wachunga avatar Aug 20 '11 11:08 wachunga

I just tested this from HEAD and it no longer seems to be an issue.

tjsingleton avatar Sep 30 '11 21:09 tjsingleton