t-mullen / simple-signal

Signalling solution for simple-peer with socket.io
MIT License
162 stars 27 forks source link

Disconnect listeners being removed can cause compatibility issues #25

Closed cuuupid closed 5 years ago

cuuupid commented 5 years ago

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.

t-mullen commented 5 years ago

Fixed in simple-signal-server@2.1.1