diff options
Diffstat (limited to 'src/serialport/qserialport_win.cpp')
-rw-r--r-- | src/serialport/qserialport_win.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp index 3174db5..84d1db7 100644 --- a/src/serialport/qserialport_win.cpp +++ b/src/serialport/qserialport_win.cpp @@ -282,6 +282,12 @@ bool QSerialPortPrivate::clear(QSerialPort::Directions directions) return false; } + // We need start async read because a reading can be stalled. Since the + // PurgeComm can abort of current reading sequence, or a port is in hardware + // flow control mode, or a port has a limited read buffer size. + if (directions & QSerialPort::Input) + startAsyncRead(); + return true; } |