Skip to content

Commit

Permalink
Merge pull request socketio#328 from wackfordjf3/patch-1
Browse files Browse the repository at this point in the history
Clears the timeout from reconnection attempt when there is a successful or failed reconnection
  • Loading branch information
rauchg committed Dec 21, 2011
2 parents 9879d8c + 3884959 commit ccae35a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/socket.js
@@ -1,4 +1,3 @@

/**
* socket.io
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
Expand Down Expand Up @@ -465,6 +464,8 @@
self.publish('reconnect', self.transport.name, self.reconnectionAttempts);
}

clearTimeout(self.reconnectionTimer);

self.removeListener('connect_failed', maybeReconnect);
self.removeListener('connect', maybeReconnect);

Expand Down

0 comments on commit ccae35a

Please sign in to comment.