diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-17 03:02:02 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-17 03:02:02 +0100 |
commit | c493980cc726de4a40782476433b463154d27700 (patch) | |
tree | 97ad44da523f178eccc2c72f263cfcd3910ed61d /src/mqtt/qmqttclient.cpp | |
parent | bd073101acc9d30e0067c9c75d5cdab7511deedf (diff) | |
parent | a9e5d36f31878e6a7c1c79137b466a92168134ec (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I495e1c269a8fec76f83229ae4900cf027dac85fc
Diffstat (limited to 'src/mqtt/qmqttclient.cpp')
-rw-r--r-- | src/mqtt/qmqttclient.cpp | 5 |
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; |