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.
|For Gerrit Dashboard: QTBUG-100511|
|394657,2||Fix issue where readyRead() could happen after disconnected()||tqtc/lts-5.15||qt/tqtc-qtbase||Status: MERGED||+2||0|