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

Xhr-based transports didn't close on "not handshaken" error and spammed server with "null". #374

Merged
merged 1 commit into from
Feb 28, 2012

Conversation

SlNPacifist
Copy link
Contributor

Some fixes related to socketio/socket.io#438
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.

Xhr-based transports didn't close on "not handshaken" error and spammed server with "null".
rauchg added a commit that referenced this pull request Feb 28, 2012
Xhr-based transports didn't close on "not handshaken" error and spammed server with "null".
@rauchg rauchg merged commit db40b10 into socketio:master Feb 28, 2012
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.

2 participants