Skip to content

Commit

Permalink
Add connect check size
Browse files Browse the repository at this point in the history
  • Loading branch information
tgracchus committed Oct 2, 2023
1 parent bae2de4 commit d97f2c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public MqttConnectDecoder(
// interested in the Length LSB byte
if (buf.readableBytes() < 2) {
mqttConnacker.connackError(clientConnectionContext.getChannel(),
"A client (ID: {}, IP: {}) connected with a packet without protocol version.",
"A client (IP: {}) connected with a packet without protocol version.",
"Sent CONNECT without protocol version",
Mqtt5ConnAckReasonCode.UNSUPPORTED_PROTOCOL_VERSION,
ReasonStrings.CONNACK_UNSUPPORTED_PROTOCOL_VERSION);
Expand Down Expand Up @@ -135,7 +135,7 @@ public MqttConnectDecoder(

private void connackInvalidProtocolVersion(final @NotNull ClientConnectionContext clientConnectionContext) {
mqttConnacker.connackError(clientConnectionContext.getChannel(),
"A client (ID: {}, IP: {}) connected with an invalid protocol version.",
"A client (IP: {}) connected with an invalid protocol version.",
"Sent CONNECT with an invalid protocol version",
Mqtt5ConnAckReasonCode.UNSUPPORTED_PROTOCOL_VERSION,
ReasonStrings.CONNACK_UNSUPPORTED_PROTOCOL_VERSION);
Expand Down

0 comments on commit d97f2c9

Please sign in to comment.