socket.io-stream icon indicating copy to clipboard operation
socket.io-stream copied to clipboard

socket.removeAllListeners() breaks ss(socket)

Open peteruithoven opened this issue 9 years ago • 4 comments

Currently when you call removeAllListeners on the socket connection that's used by socket.io-stream you break the socket.io-stream insance. Should we overrule the removeAllListeners method and make sure we re-add the socket.io-stream listeners? Something like:

var originalRemoveAllListeners = sio.removeAllListeners;
  sio.removeAllListeners = function() {
  originalRemoveAllListeners.apply(sio, arguments);
  // re-add socket.io listeners
}

peteruithoven avatar Oct 21 '14 13:10 peteruithoven