Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

catch Error, because socket of null sometimes take an Error

  • Loading branch information...
commit 54da4e862683db927b8f3c100669f803f12a3178 1 parent 61e4105
Mitsuaki Ishimoto justoneplanet authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/WebSocketRequest.js
8 lib/WebSocketRequest.js
View
@@ -377,8 +377,12 @@ WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, co
// }
response += "\r\n";
-
- if (this.socket != null) this.socket.write(response, 'ascii');
+ try {
+ if (this.socket != null) this.socket.write(response, 'ascii');
+ }
+ catch(e) {
+ console.log('justoneplanet-' + e);
+ }
this.emit('requestAccepted', connection);
Please sign in to comment.
Something went wrong with that request. Please try again.