Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.10.0, 5.10.1
-
None
-
62accf0dc505546ac6f8da4a589fe1d7b86bc49c
Description
While starting up, QTcpSocket::connectToHost() might never timeout, nor return success or failure. As a consequence, Qt Mqtt stays in connecting state forever.
Even more problematic is, that a manual disconnectFromHost() does not work either as it only allows to send a DISCONNECT frame and close the connection once a connection has been established.
The current workaround is to access the QTcpSocket via QMqttClient::transport() and call close() on it. This emits all disconnected signals and the QMqttClient returns into a valid state from where it can retry to connect.
Attachments
For Gerrit Dashboard: QTBUG-66412 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
220370,2 | Fix disconnectFromHost when in connecting state | 5.11 | qt/qtmqtt | Status: MERGED | +2 | 0 |
231083,1 | Fix disconnectFromHost when in connecting state | wip/mqtt5 | qt/qtmqtt | Status: ABANDONED | 0 | 0 |