[1.0] Reconnect for xhr-polling is still broken #545

Closed
kof opened this Issue Apr 25, 2013 · 1 comment

Comments

Projects
None yet
3 participants

kof commented Apr 25, 2013

If I turn off the server, reconnect doesn't happens at all. After some investigation it fails on multiple places:

  1. https://github.com/LearnBoost/socket.io-client/blob/master/lib/manager.js#L133

    readyState is "open" at the moment of reconnect, so it just does return and no further tries.

  2. attempt to fix it on https://github.com/LearnBoost/socket.io-client/blob/master/lib/manager.js#L330

before to call this.open, I set this.readyState = 'reconnecting';

Now I see the whole time this:

socket.io-client:manager open +0ms main.js:32784
socket.io-client:manager connect attempt will timeout after 10000 +0ms main.js:32784
socket.io-client:manager connect attempt timed out after 10000 +10s main.js:32784
socket.io-client:manager reconnect attempt error +0ms main.js:32784
socket.io-client:manager will wait 5000ms before reconnect attempt +0ms main.js:32784
socket.io-client:manager attemptign reconnect +5s main.js:32784
socket.io-client:manager open +0ms main.js:32784
socket.io-client:manager connect attempt will timeout after 10000 +0ms

But there is no one request issued. Something prevents it from making a request. The same happens if a call this.close() additionally.

Contributor

nkzawa commented Apr 27, 2013

I fixed the issue, but it looks like the feature of reconnection is not completely implemented yet.

@rauchg rauchg closed this Nov 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment