Skip to content

Commit

Permalink
fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz committed Feb 13, 2013
1 parent e704818 commit 317b490
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions dist/peer.js
Expand Up @@ -1421,8 +1421,10 @@ Socket.prototype._startWebSocket = function() {
this._socket.onopen = function() {
if (!!self._timeout) {
clearTimeout(self._timeout);
self._http.abort();
self._http = null;
setTimeout(function(){
self._http.abort();
self._http = null;
}, 5000);
}
util.log('Socket open');
};
Expand Down

0 comments on commit 317b490

Please sign in to comment.