Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reconnecting event and relevant test #631

Closed
wants to merge 5 commits into from

Conversation

poohlt
Copy link
Contributor

@poohlt poohlt commented Feb 28, 2014

@guille A pull request to make a Manager emits 'reconnecting' event when trying to reconnect. Also a test case is included :)

@rauchg
Copy link
Contributor

rauchg commented Mar 1, 2014

@poohlty we need to emit the reconnection events on the sockets, not the manager.

@rauchg
Copy link
Contributor

rauchg commented Mar 1, 2014

Aka if you do

var socket1 = io('/a');
var socket2 = io('/b');
socket2.disconnect();

And then you lose connection, socket1 should emit reconnecting but socket2 shouldn't.

@rauchg
Copy link
Contributor

rauchg commented Mar 1, 2014

Also, there are conflicts that prevent this from being mergeable. Same with the other pull request on socket.io

@poohlt
Copy link
Contributor Author

poohlt commented Mar 2, 2014

Ah, make sense. How do I know when the socket should emit 'reconnecting' though? It seems to me that the reconnecting logic is handled by a manager, which is hidden to a socket?

@poohlt
Copy link
Contributor Author

poohlt commented Mar 9, 2014

@guille do I need more updates on this?

socket.close();
done();
});
socket.io.reconnect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is not public API, i'd rather us test by forcing a disconnetion, and expecting a reconnection.

@poohlt
Copy link
Contributor Author

poohlt commented Apr 4, 2014

@guille Now the test closes the engine rather than calling reconnect :)

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants