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

QWebSocket can emit binaryMessageReceived signal after being disconnected

    XMLWordPrintable

    Details

    • Commits:
      e1c92b5748 (qt/qtwebsockets/dev) 8bec50aeb7 (qt/qtwebsockets/6.3) 131a5a09e9 (qt/qtwebsockets/6.2) 131a5a09e9 (qt/tqtc-qtwebsockets/6.2) 8bec50aeb7 (qt/tqtc-qtwebsockets/6.3) e1c92b5748 (qt/tqtc-qtwebsockets/dev) 131a5a09e9 (qt/qtwebsockets/6.2.4)

      Description

      QWebSocket uses QueuedConnection to handle readyRead() signals (see qwebsocket_p.cpp in makeConnections()) from the backing QTcp/SslSocket, but it uses direct connection from the socket to notify of disconnection.

      https://code.qt.io/cgit/qt/qtwebsockets.git/tree/src/websockets/qwebsocket_p.cpp#n624

      That can lead to situation where disconnected() signal is fired first and then the message is reported after that, which complicates the application logic a bit because this would have to be taken into account.

        Attachments

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

          Activity

            People

            Assignee:
            kurt.pattyn Kurt Pattyn
            Reporter:
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes