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.