summaryrefslogtreecommitdiffstats
path: root/src/mqtt/qmqttclient.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-17 03:02:02 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-17 03:02:02 +0100
commitc493980cc726de4a40782476433b463154d27700 (patch)
tree97ad44da523f178eccc2c72f263cfcd3910ed61d /src/mqtt/qmqttclient.cpp
parentbd073101acc9d30e0067c9c75d5cdab7511deedf (diff)
parenta9e5d36f31878e6a7c1c79137b466a92168134ec (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/mqtt/qmqttclient.cpp')
-rw-r--r--src/mqtt/qmqttclient.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mqtt/qmqttclient.cpp b/src/mqtt/qmqttclient.cpp
index fd6ca5d..0ea0f1e 100644
--- a/src/mqtt/qmqttclient.cpp
+++ b/src/mqtt/qmqttclient.cpp
@@ -521,6 +521,11 @@ void QMqttClient::connectToHost(bool encrypted, const QString &sslPeerName)
{
Q_D(QMqttClient);
+ if (state() == QMqttClient::Connecting) {
+ qCDebug(lcMqttClient) << "Connection request currently ongoing.";
+ return;
+ }
+
if (state() == QMqttClient::Connected) {
qCDebug(lcMqttClient) << "Already connected to a broker. Rejecting connection request.";
return;