Skip to content

Commit e854f93

Browse files
author
chongyuan
committed
Maximum QoS Property value length should be 1 byte
Signed-off-by: chongyuan <yinchongyuan@xmeter.net>
1 parent 41b6904 commit e854f93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • org.eclipse.paho.mqttv5.common/src/main/java/org/eclipse/paho/mqttv5/common/packet

org.eclipse.paho.mqttv5.common/src/main/java/org/eclipse/paho/mqttv5/common/packet/MqttProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public void decodeProperties(DataInputStream dis) throws IOException, MqttExcept
476476
} else if (identifier == TOPIC_ALIAS_IDENTIFIER) {
477477
topicAlias = (int) inputStream.readShort();
478478
} else if (identifier == MAXIMUM_QOS_IDENTIFIER) {
479-
maximumQoS = (int) inputStream.readShort();
479+
maximumQoS = inputStream.read();
480480
} else if (identifier == RETAIN_AVAILABLE_IDENTIFIER) {
481481
retainAvailable = inputStream.readBoolean();
482482
} else if (identifier == USER_DEFINED_PAIR_IDENTIFIER) {

0 commit comments

Comments
 (0)