Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
When an error occurs during the connection we should disconnect
  • Loading branch information
3rd-Eden committed Sep 17, 2010
commit a3879822896c0e4cd0261f66b277a942f3680b49
4 changes: 4 additions & 0 deletions lib/socket.io/transports/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ WebSocket.prototype._onConnect = function(req, socket){
self._handle(data);
});

this.connection.addListener('error', function(data){
self._onDisconnect(data);
});

if (this._proveReception(headers)) this._payload();
};

Expand Down