Worlize/WebSocket-Node — pull request #24 by justoneplanet (2011-11-27 12:00:37+00:00)
Title: Prevent from an Error

Sometimes I find the following error.
So I fix the file "WebSocketRequest.js" to check the null of socket.

//================================================
net.js:432
var writeReq = this._handle.write(data);
^
TypeError: Cannot call method 'write' of null
at Socket._write (net.js:432:31)
at Socket.write (net.js:424:15)
at WebSocketRequest.accept (./node_modules/websocket/lib/WebSocketRequest.js:381:41)
at WebSocketServer.handleUpgrade (./node_modules/websocket/lib/WebSocketServer.js:180:19)
at Server. (native)
at Server.emit (events.js:88:20)
at Socket. (http.js:1390:14)
at TCP.onread (net.js:334:27)