mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-14 01:17:55 -05:00
Calling `socket.join()` after disconnection would lead to a memory
leak, because the room was never removed from the memory:
```js
io.on("connection", (socket) => {
socket.disconnect();
socket.join("room1"); // leak
});
```
Related:
- https://github.com/socketio/socket.io/issues/4067
- https://github.com/socketio/socket.io/issues/4380
Backported from 18f3fdab12