faye/faye-websocket-node — pull request #34 by lpinca (2014-11-25 18:37:09+00:00)
Title: Fix cases where the socket is closed during a handshake

If the stream is not readable it means that other end has sent the FIN packet.
When this happens we can end the write site of the socket and bail out.

I don't know if this approach has side effects but it seems to work.