Skip to content
Snippets Groups Projects
Commit 476e5927 authored by NB Grey's avatar NB Grey
Browse files

fix disconnect error when received mqtt version error

parent bb019b26
Branches
Tags
No related merge requests found
......@@ -74,6 +74,11 @@ public class MQTT5Connack(
ReasonCode.valueOf(inStream.readByte().toInt()) ?: throw MQTTException(
ReasonCode.PROTOCOL_ERROR
)
if (connectReasonCode !in validReasonCodes) throw MQTTException(
ReasonCode.PROTOCOL_ERROR
)
val properties = inStream.deserializeProperties(validProperties)
return MQTT5Connack(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment