moquette-io / moquette

Java MQTT lightweight broker
http://moquette-io.github.io/moquette/
Apache License 2.0
2.27k stars 814 forks source link

Avoid to drain on an already closed/destroyed session #735

Closed andsel closed 1 year ago

andsel commented 1 year ago

On a DISCONNECT message Netty is notified of the MQTT disconnect message, which destroy the session and then when the TCP connection terminates it receives channelReadComplete (on connection lost notification). In this case draining the session queue (which is already closed) on a closed session generates an error.

This commit avoid to drain on already closed sessions.