diff --git a/src/windows/com.rs b/src/windows/com.rs index 5573ab77..66b56ed9 100644 --- a/src/windows/com.rs +++ b/src/windows/com.rs @@ -10,7 +10,7 @@ use winapi::um::handleapi::*; use winapi::um::processthreadsapi::GetCurrentProcess; use winapi::um::winbase::*; use winapi::um::winnt::{ - DUPLICATE_SAME_ACCESS, FILE_ATTRIBUTE_NORMAL, GENERIC_READ, GENERIC_WRITE, HANDLE, + DUPLICATE_SAME_ACCESS, FILE_ATTRIBUTE_NORMAL, GENERIC_READ, GENERIC_WRITE, HANDLE, MAXDWORD, }; use crate::windows::dcb; @@ -243,7 +243,7 @@ impl SerialPort for COMPort { let milliseconds = timeout.as_millis(); let mut timeouts = COMMTIMEOUTS { - ReadIntervalTimeout: 0, + ReadIntervalTimeout: MAXDWORD, ReadTotalTimeoutMultiplier: 0, ReadTotalTimeoutConstant: milliseconds as DWORD, WriteTotalTimeoutMultiplier: 0,