max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
667 stars 114 forks source link

end the stream when the websocket closes #68

Closed ghost closed 9 years ago

ghost commented 9 years ago

When the remote end closes, there's no notification at the server side of the connection right now. This patch ends the stream when the remote end closes.

It might also be a good idea to have a close event to handle cleanup and such.

mafintosh commented 9 years ago

Hmm. This should already work (close should be emitted when the stream is destroyed). Could you add a test case for this?

ghost commented 9 years ago

Test added!

mafintosh commented 9 years ago

Released in 1.5.0