This commit is contained in:
Dejan Bosanac 2015-10-05 12:55:25 +02:00
parent 81b4b9ae3d
commit b83c38b04c
2 changed files with 4 additions and 1 deletions

View File

@ -376,6 +376,9 @@ public class MQTTProtocolConverter {
public void onUnSubscribe(UNSUBSCRIBE command) throws MQTTProtocolException { public void onUnSubscribe(UNSUBSCRIBE command) throws MQTTProtocolException {
checkConnected(); checkConnected();
if (command.qos() != QoS.AT_LEAST_ONCE && (version != V3_1 || publishDollarTopics != true)) {
throw new MQTTProtocolException("Failed to process unsubscribe request", true, new Exception("UNSUBSCRIBE frame not properly formatted, QoS"));
}
UTF8Buffer[] topics = command.topics(); UTF8Buffer[] topics = command.topics();
if (topics != null) { if (topics != null) {
for (UTF8Buffer topic : topics) { for (UTF8Buffer topic : topics) {

View File

@ -94,7 +94,7 @@
<leveldbjni-version>1.8</leveldbjni-version> <leveldbjni-version>1.8</leveldbjni-version>
<log4j-version>1.2.17</log4j-version> <log4j-version>1.2.17</log4j-version>
<mockito-version>1.10.19</mockito-version> <mockito-version>1.10.19</mockito-version>
<mqtt-client-version>1.11</mqtt-client-version> <mqtt-client-version>1.12</mqtt-client-version>
<openjpa-version>1.2.0</openjpa-version> <openjpa-version>1.2.0</openjpa-version>
<org-apache-derby-version>10.11.1.1</org-apache-derby-version> <org-apache-derby-version>10.11.1.1</org-apache-derby-version>
<org.osgi.core-version>4.3.1</org.osgi.core-version> <org.osgi.core-version>4.3.1</org.osgi.core-version>