netty-socketio
netty-socketio copied to clipboard
[BUG] Possible for leaking memory
Problem scenario: When a client join a specific room other than default namespace, then disconnect without leaving the room that was joined before, the record would not be clear out automatically, which consequently might lead to OOM as cases like this accumulated. This theory can be easily proved by a simple test.
Suggestion: On the method onDisconnect of class Namespace, add automatically clear out procedure by iterating every room that the disconnecting client was in, and leave.
我也遇到了这个问题
Hi, was debugging a memory leak on our production servers, and looks like I'm running into this have tried out the change suggested above, and things seem to work fine, will test more and raise a PR here since, BulkJoinLeave was implemented, we can leverage it to send an event to Bulk Leave for all the joined rooms at once