summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2017-09-20 15:12:52 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-09-23 06:37:51 +0000
commit3840db5254fc396b0b02a3510e48536b63b4a223 (patch)
tree751509763237bc16fbcb4d88d44f2d0c3e147427
parentca21591cdbf46cc2e15062e2d722bb4a1cf0e897 (diff)
Do not unsubscribe on disconnect
Sending UNSUBSCRIBE for all subscriptions before disconnecting will cause the broker to not store any messages afterwards by the standard. However, mosquitto does so and hence conformance tests succeeded even though they should not have. This was revealed when using the paho conformance testing broker in the CI. Task-number: QTBUG-63318 Change-Id: I5c2410b45b7c0e5bf5cebeb13a8aa8dfd9f0ae3a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/mqtt/qmqttconnection.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/mqtt/qmqttconnection.cpp b/src/mqtt/qmqttconnection.cpp
index ee327fc..6466801 100644
--- a/src/mqtt/qmqttconnection.cpp
+++ b/src/mqtt/qmqttconnection.cpp
@@ -441,8 +441,6 @@ bool QMqttConnection::sendControlDisconnect()
m_pingTimer.stop();
- for (auto sub : m_activeSubscriptions)
- sub->unsubscribe();
m_activeSubscriptions.clear();
const QMqttControlPacket packet(QMqttControlPacket::DISCONNECT);