close socket if upgrade is received and socket.readyState != open #141

Merged
merged 1 commit into from Feb 8, 2013

Conversation

Projects
None yet
2 participants
Contributor

ruxkor commented Jan 30, 2013

if a socket is closed (socket.close()) while an upgrade is happening, i.e. after the server received the ping (probe) and sent his own pong (probe), but before he received the upgrade packet, and the old, polling socket is currently not writable (i.e. the close packet was not sent), the ws transport stays open and both client and server, but no data is sent through it since the eio server's socket is on closed.

by calling a transport.close if an upgrade is received on any readyState but open, the race condition does not occur anymore in our tests.

rauchg merged commit 1059147 into socketio:master Feb 8, 2013

ruxkor deleted the pokermania:to_learnboost_20130130 branch Feb 10, 2013

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