Terminating the connection if the client failed to receive a CONNACK packet with a non-zero return code. Stated in 3.2.2.3 of MQTT 3.1.1 specificaton.

Was checking the wrong channel to see if it was still open or not. The channel that the test was checking on was disconnected a few lines above.
This commit is contained in:
Kevin Berendsen
2016-08-07 13:34:06 +02:00
parent 32b6b9b1da
commit 807debb622
2 changed files with 13 additions and 0 deletions
@@ -280,6 +280,8 @@ public class ProtocolProcessor {
ConnAckMessage okResp = new ConnAckMessage();
okResp.setReturnCode(ConnAckMessage.BAD_USERNAME_OR_PASSWORD);
session.writeAndFlush(okResp);
session.close();
LOG.info("Client {} failed to connect with bad username or password.", session);
}
/**