Currently it seems socket.on('disconnect', ... listeners are being removed. This causes compatibility issues if the socket.io instance is being used by other services that listen to disconnect.
Workaround: for now, using socket.on('disconnecting', ... is a quick fix for most use cases.
I would propose not removing the other listeners and instead issuing a console warning if there are other listeners present.
Currently it seems
socket.on('disconnect', ...
listeners are being removed. This causes compatibility issues if thesocket.io
instance is being used by other services that listen todisconnect
.Workaround: for now, using
socket.on('disconnecting', ...
is a quick fix for most use cases.I would propose not removing the other listeners and instead issuing a console warning if there are other listeners present.