einaros/ws — pull request #55 by nicokaiser (2012-04-06 09:51:20+00:00)
Title: Add "error" and "timeout" handlers before handshake

The application did not have the chance to add those handlers to the socket, and if the handshake's 'write' fails the server crashes.

Also, despite 'socket.setTimeout(0)' I observed socket timeouts, maybe they happen during the (unfinished) handshakes, so we should catch them and destroy the socket.