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

windows: QLocalSocket can emit readyRead() after disonnected()

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      27a6938cb4 (qt/tqtc-qtbase/5.15)

      Description

      There is a possibility that readyRead() is emitted after disconnected(). When another application sends a message and disconnects right after:

      1) QWindowsPipeReader::notified is called with errorCode = ERROR_SUCCESS and numberOfBytesRead with the size of the final message
      2) Still inside QWindowsPipeReader::notified, QWindowsPipeReader::startAsyncRead is called, which calls QWindowsPipeReader::checkPipeState, it emits pipeClosed() which is queued
      3) Still inside QWindowsPipeReader::notified, it emits _q_queueReadyRead() which is queued
      4) After the event loop returns, _q_pipeClosed() then causes disconnected () be emitted, and emitPendingReadyRead() causes readyRead() to be called.

        Attachments

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

          Activity

            People

            Assignee:
            manordheim MÃ¥rten Nordheim
            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