summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2018-03-09 11:04:18 +0100
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2018-03-12 09:10:50 +0000
commit434ed837417ed0692bc55fc882d918a47a6b7e71 (patch)
treeee743c23d79494d97f6fbd92cc0a4387f9d819fa /src
parent539bc149f00361f3d76970eeab4557b6a2eb6bca (diff)
Fix connecting via an already open QIODevice transportv5.11.0-beta4v5.11.0-beta3
In case a transport is handed over to QMqttClient which is based on QIODevice and already opened, the implementation was not sending a CONNECT request and hence the broker never got informed about a new client establishing connection. Hence manually send the connect statement. For QAbstractSocket based transports this was done already. Task-number: QTBUG-66955 Change-Id: I50cba1b6dd03d0af561d4e39a3b57af5b2161a4b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/mqtt/qmqttconnection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mqtt/qmqttconnection.cpp b/src/mqtt/qmqttconnection.cpp
index aaaa514..b60816a 100644
--- a/src/mqtt/qmqttconnection.cpp
+++ b/src/mqtt/qmqttconnection.cpp
@@ -126,7 +126,7 @@ bool QMqttConnection::ensureTransportOpen(const QString &sslPeerName)
if (m_transportType == QMqttClient::IODevice) {
if (m_transport->isOpen())
- return true;
+ return sendControlConnect();
if (!m_transport->open(QIODevice::ReadWrite)) {
qWarning("Could not open Transport IO device");