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

"QLocalSocket::waitForDisconnected() is not allowed in UnconnectedState" error shown with the code from the QLocalSocket documentation

    XMLWordPrintable

Details

    • 2d680b27f3c56aacbec3191f38b7b1898c8747b1 (qt/qtbase/5.13)

    Description

      If one follows the code example in QLocalSocket::waitForDisconnected() and do:

      socket->disconnectFromServer();
      if (socket->waitForDisconnected(1000))
          qDebug("Disconnected!");
      

      It gives an error:
      "QLocalSocket::waitForDisconnected() is not allowed in UnconnectedState"

      on Windows.

      Could it be that the state is changed too early before waitForDisconnected() has returned?

      Attachments

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

        Activity

          People

            kari.oikarinen Kari Oikarinen
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes