Commit 0ffa0511fb70b520027325fd8288d422884e8f48
1 parent
e4b43df7
Subscription identifiers in subscribe is protocol error
The CONACK indicated that it's not supported, and the specs say to issue a disconnect when they're used after all.
Showing
1 changed file
with
1 additions
and
2 deletions
mqttpacket.cpp
| @@ -730,8 +730,7 @@ void MqttPacket::handleSubscribe() | @@ -730,8 +730,7 @@ void MqttPacket::handleSubscribe() | ||
| 730 | switch (prop) | 730 | switch (prop) |
| 731 | { | 731 | { |
| 732 | case Mqtt5Properties::SubscriptionIdentifier: | 732 | case Mqtt5Properties::SubscriptionIdentifier: |
| 733 | - decodeVariableByteIntAtPos(); | ||
| 734 | - break; | 733 | + throw ProtocolError("Subscription identifiers not supported", ReasonCodes::ProtocolError); |
| 735 | case Mqtt5Properties::UserProperty: | 734 | case Mqtt5Properties::UserProperty: |
| 736 | readUserProperty(); | 735 | readUserProperty(); |
| 737 | break; | 736 | break; |