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

Socket improperly handles errors when connecting #373

Closed
SlNPacifist opened this issue Jan 20, 2012 · 1 comment
Closed

Socket improperly handles errors when connecting #373

SlNPacifist opened this issue Jan 20, 2012 · 1 comment

Comments

@SlNPacifist
Copy link
Contributor

At line https://github.com/LearnBoost/socket.io-client/blob/master/lib/socket.js#L221 xhr-based transport starts polling, but server responses with "not handshaken" error.
Socket doesn't handle disconnect as socket.connected flag is not set yet and transport is left open. While transport is open it sends "null" each time it receives data from server in order to keep connection to server. For example, xhr-polling does it in https://github.com/LearnBoost/socket.io-client/blob/master/lib/transports/xhr-polling.js#L71.
This patch closes transport if socket gets error with "reconnect" advice during connecting process.

@SlNPacifist
Copy link
Contributor Author

duplicate of #374

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

No branches or pull requests

1 participant