Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.15.8
-
Fix Version/s: 5.15.9
-
Component/s: Network: Sockets
-
Labels:
-
Platform/s:
-
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.