mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
912e13ad30bd584e2ece747be96a1ba0669dd874
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.
socket.io-adapter
Default socket.io in-memory adapter class.
Compatibility table:
| Adapter version | Socket.IO server version |
|---|---|
| 1.x.x | 1.x.x / 2.x.x |
| 2.x.x | 3.x.x |
How to use
This module is not intended for end-user usage, but can be used as an interface to inherit from other adapters you might want to build.
As an example of an adapter that builds on top of this, please take a look at socket.io-redis.
License
MIT
Languages
TypeScript
63.8%
JavaScript
36%