diff --git a/compio-driver/src/iocp/cp/mod.rs b/compio-driver/src/iocp/cp/mod.rs index 87f2d6a5..d391b490 100644 --- a/compio-driver/src/iocp/cp/mod.rs +++ b/compio-driver/src/iocp/cp/mod.rs @@ -24,8 +24,8 @@ use windows_sys::Win32::{ Foundation::{ GetLastError, RtlNtStatusToDosError, ERROR_BAD_COMMAND, ERROR_BROKEN_PIPE, ERROR_HANDLE_EOF, ERROR_IO_INCOMPLETE, ERROR_NO_DATA, ERROR_PIPE_CONNECTED, - FACILITY_NTWIN32, INVALID_HANDLE_VALUE, NTSTATUS, STATUS_PENDING, STATUS_SUCCESS, - WAIT_IO_COMPLETION, + ERROR_PIPE_NOT_CONNECTED, FACILITY_NTWIN32, INVALID_HANDLE_VALUE, NTSTATUS, STATUS_PENDING, + STATUS_SUCCESS, WAIT_IO_COMPLETION, }, Storage::FileSystem::SetFileCompletionNotificationModes, System::{ @@ -184,8 +184,12 @@ impl CompletionPort { } else { let error = unsafe { RtlNtStatusToDosError(overlapped.base.Internal as _) }; match error { - ERROR_IO_INCOMPLETE | ERROR_HANDLE_EOF | ERROR_BROKEN_PIPE - | ERROR_PIPE_CONNECTED | ERROR_NO_DATA => Ok(0), + ERROR_IO_INCOMPLETE + | ERROR_HANDLE_EOF + | ERROR_BROKEN_PIPE + | ERROR_PIPE_CONNECTED + | ERROR_PIPE_NOT_CONNECTED + | ERROR_NO_DATA => Ok(0), _ => Err(io::Error::from_raw_os_error(error as _)), } }; diff --git a/compio-driver/src/iocp/op.rs b/compio-driver/src/iocp/op.rs index d3cb39e5..b875b645 100644 --- a/compio-driver/src/iocp/op.rs +++ b/compio-driver/src/iocp/op.rs @@ -22,7 +22,8 @@ use windows_sys::{ Foundation::{ CloseHandle, GetLastError, ERROR_ACCESS_DENIED, ERROR_BROKEN_PIPE, ERROR_HANDLE_EOF, ERROR_IO_INCOMPLETE, ERROR_IO_PENDING, ERROR_NOT_FOUND, ERROR_NO_DATA, - ERROR_PIPE_CONNECTED, ERROR_SHARING_VIOLATION, FILETIME, INVALID_HANDLE_VALUE, + ERROR_PIPE_CONNECTED, ERROR_PIPE_NOT_CONNECTED, ERROR_SHARING_VIOLATION, FILETIME, + INVALID_HANDLE_VALUE, }, Networking::WinSock::{ closesocket, setsockopt, shutdown, socklen_t, WSAIoctl, WSARecv, WSARecvFrom, WSASend, @@ -55,7 +56,11 @@ fn winapi_result(transferred: u32) -> Poll> { assert_ne!(error, 0); match error { ERROR_IO_PENDING => Poll::Pending, - ERROR_IO_INCOMPLETE | ERROR_HANDLE_EOF | ERROR_BROKEN_PIPE | ERROR_PIPE_CONNECTED + ERROR_IO_INCOMPLETE + | ERROR_HANDLE_EOF + | ERROR_BROKEN_PIPE + | ERROR_PIPE_CONNECTED + | ERROR_PIPE_NOT_CONNECTED | ERROR_NO_DATA => Poll::Ready(Ok(transferred as _)), _ => Poll::Ready(Err(io::Error::from_raw_os_error(error as _))), }