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

Multiple (and continuous) disconnection events fired

Open muratmat opened this issue 15 years ago • 11 comments

socketClient = io.connect('http://' + serverHost + ':' + serverPort, { 'connect timeout': 5000, 'reconnect': false, 'auto connect': false }); socketClient.on('disconnect', onDisconnect); socketClient.socket.connect();

function onDisconnect() { socketClient.socket.connect(); }

When I click on my UI "Disconnect button", I call socketClient.socket.disconnect(), so the onDisconnect callback is executed. After this call, the client fires disconnection events continuously, at the rate of one every ~25 seconds. The bug is present on Chrome 12 (12.0.742.122), on Windows 7 and on MacOSX Lion. Internet Explorer 9 (Win7), Firefox 5.0.1 (MacOSX Lion) and Safari 5.1 (MacOSX Lion) are not affected by this bug.

muratmat avatar Jul 26 '11 15:07 muratmat

+1

With "reconnect: true", after the first reconnection... the client disconnect and reconnect again successively, on every ˜25 seconds. Im using Chrome 12 on MacOSX.

node 0.4.10 / socket.io 0.7.7

rickgbw avatar Jul 27 '11 20:07 rickgbw

+1

easternbloc avatar Jul 28 '11 14:07 easternbloc

+1 and also experiencing this on Firefox 5.1 Mac OSX 10.6.7

mattyod avatar Jul 28 '11 14:07 mattyod

+1 Pretty major issue.

Chrome, socket.io 0.7.7, client 0.7.4, node.js 0.4.8. Cross domain

theyak avatar Jul 28 '11 16:07 theyak

+1 Chrome 14.0.835.8, socket.io 0.7.7

takempf avatar Jul 30 '11 00:07 takempf

Reported the same issue. Without the reconnect true, and after a manual disconnect/reconnect, the client will disconnect after about 20 seconds. This will happen on chrome with websockets and on firefox with flashsockets.

desheikh avatar Jul 31 '11 18:07 desheikh

Any news? Has the problem/cause been at least identified?

muratmat avatar Aug 04 '11 13:08 muratmat

+1 Chrome 13.0.782.112, socket.io 0.7.9

wachunga avatar Aug 20 '11 11:08 wachunga

+1 Important to me.

shepherdsam avatar Aug 24 '11 23:08 shepherdsam

+1

russellporter avatar Oct 02 '11 02:10 russellporter

Nothing yet?

handelcamilo avatar Oct 07 '12 21:10 handelcamilo