Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.3.1
-
None
Description
If, within a slot in the same event loop that manages a QSerialPort instance, an application calls write followed by waitForReadyRead, the async write operation will not get started until waitForReadyRead returns (possibly never if using infinite timeout). This is because the slot connected to the QTimer timeout signal never gets executed.
If, however, the application calls waitForBytesWritten between the call to write and waitForReadyRead, the async write operation will get started (since waitForBytesWritten calls startAsyncWrite).
A simple fix is to call startAsyncWrite inside waitForReadyRead (and possibly in other blocking operations).