diff --git a/src/impl/win.cc b/src/impl/win.cc index 889e06f1..411f9903 100644 --- a/src/impl/win.cc +++ b/src/impl/win.cc @@ -465,7 +465,8 @@ Serial::SerialImpl::flush () if (is_open_ == false) { throw PortNotOpenedException ("Serial::flush"); } - FlushFileBuffers (fd_); + PurgeComm(fd_, PURGE_RXCLEAR); + PurgeComm(fd_, PURGE_TXCLEAR); } void