Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix race condition when leaving rooms (#74)
This should fix the related issue: ``` TypeError: Cannot read property 'size' of undefined at Adapter._del (/app/node_modules/socket.io-adapter/dist/index.js:67:37) at Adapter.delAll (/app/node_modules/socket.io-adapter/dist/index.js:83:18) at Socket.leaveAll (/app/node_modules/socket.io/dist/socket.js:190:22) at Socket._onclose (/app/node_modules/socket.io/dist/socket.js:334:14) at Client.onclose (/app/node_modules/socket.io/dist/client.js:245:20) at Socket.emit (events.js:412:35) at Socket.onClose (/app/node_modules/engine.io/lib/socket.js:348:12) at Object.onceWrapper (events.js:519:28) at WebSocket.emit (events.js:400:28) at WebSocket.onClose (/app/node_modules/engine.io/lib/transport.js:106:10) ``` A test case was added, which reproduces the issue by adding a listener to the "leave-room" event. This does not seem to be the case for the user reporting the issue though, which may indicate that the root cause is elsewhere.
- Loading branch information