mrniko / netty-socketio

Socket.IO server implemented on Java. Realtime java framework
Apache License 2.0
6.83k stars 1.66k forks source link

[MEMORY LEAK] ClientHead Leak if WebSocket hanshake fails #990

Closed berinhardt closed 4 months ago

berinhardt commented 4 months ago

On any new connection (without sid), AuthorizeHandler.authorize gets called, creates a ClientHead, and assigns a sid, putting it in ClientsBox.uuid2client and send the request down the pipeline. Then comes the WebSocketTransport class, and tries the handshake. If no handshaker is found, or if the handshake fails, the client never gets removed from ClientsBox.uuid2client and gets leaked.

This would be much less of an issue if not for the other bug I found #989 which slowly but surely keeps adding packets to the transportState queue

berinhardt commented 4 months ago

I've just seen release 2.0.11