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

MQTT: Connection error on device boot up

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.0 Alpha
    • 5.10.0, 5.10.1
    • MQTT
    • 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

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

        Activity

          People

            mkalinow Maurice Kalinowski
            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