diff --git a/alvr/common/src/connection_result.rs b/alvr/common/src/connection_result.rs index 2cd8df920d..cb29dc7456 100644 --- a/alvr/common/src/connection_result.rs +++ b/alvr/common/src/connection_result.rs @@ -65,7 +65,11 @@ pub trait HandleTryAgain { impl HandleTryAgain for io::Result { fn handle_try_again(self) -> ConResult { self.map_err(|e| { - if e.kind() == io::ErrorKind::TimedOut || e.kind() == io::ErrorKind::WouldBlock { + // Ignore ERROR_IO_PENDING on Windows (code 997) + if e.kind() == io::ErrorKind::TimedOut + || e.kind() == io::ErrorKind::WouldBlock + || (cfg!(windows) && e.raw_os_error() == Some(997)) + { ConnectionError::TryAgain(e.into()) } else { ConnectionError::Other(e.into())