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
Conversation
@poohlty we need to emit the reconnection events on the sockets, not the manager. |
Aka if you do
And then you lose connection, socket1 should emit |
Also, there are conflicts that prevent this from being mergeable. Same with the other pull request on |
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? |
@guille do I need more updates on this? |
socket.close(); | ||
done(); | ||
}); | ||
socket.io.reconnect(); |
There was a problem hiding this comment.
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.
@guille Now the test closes the engine rather than calling reconnect :) |
@guille A pull request to make a Manager emits 'reconnecting' event when trying to reconnect. Also a test case is included :)