stream.destroy() invokes stream.removeAllListeners() within SockJS's closing sequence. To make 'end', 'close' handlers called properly, stream.destroy() should be deferred.
defer 'calling destroy' after 'closing sequence'
That is a bug in sockjs
I posted an issue about that a while back...
Probably best to just not call destroy, since sockjs doesn't bother to implement destroy correctly.
Looks like it has been fixed in sockjs. Can we update the dependency to 0.3.15?
Aw, nope, it's still not fixed. I still don't get a close or end event if I disconnect
Nah, that's because I'm using shoe-bin, will submit a patch there...