Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66412

MQTT: Connection error on device boot up

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.10.0, 5.10.1
    • Fix Version/s: 5.11.0 Alpha
    • Component/s: MQTT
    • Labels:
      None
    • Commits:
      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            mkalinow Maurice Kalinowski
            Reporter:
            mkalinow Maurice Kalinowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes