einaros/ws — pull request #176 by 3rd-Eden (2013-04-05 23:15:35+00:00)
Title: Emit the close event before destroying the internal _socket

This way we can still read out the bytesRead and bytesSend from the socket when it
closes the connections. This can be useful for metrics collection etc.

I can't find any other way of solving this cleanly. Moving the `close` event has no side affects as far as I'm aware off.