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.
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.