We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
flush()
1 parent d1f900d commit 2dbf9a9Copy full SHA for 2dbf9a9
src/serial/private/serialport/serialport_posix.nim
@@ -834,7 +834,7 @@ proc flush*(port: SerialPort | AsyncSerialPort) =
834
if not port.isOpen():
835
raise newException(InvalidSerialPortStateError, "Port must be open in order to be flushed")
836
837
- if tcflush(cint(port.handle), TCIOFLUSH) == -1:
+ if tcdrain(cint(port.handle)) == -1:
838
raiseOSError(osLastError())
839
840
proc close*(port: SerialPort | AsyncSerialPort) =
0 commit comments