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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user