From f00d4b677556a007a28fcb0bb3548ecdb54a29ae Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 28 Aug 2024 19:59:46 -0400 Subject: [PATCH] win,pipe: fix missing assignment to success (#4515) --- src/win/pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/win/pipe.c b/src/win/pipe.c index 15e0fe6b6a8..5a324bb0410 100644 --- a/src/win/pipe.c +++ b/src/win/pipe.c @@ -2004,7 +2004,9 @@ static int uv__pipe_read_data(uv_loop_t* loop, if (r == ERROR_IO_PENDING) { r = CancelIoEx(handle->handle, &req->u.io.overlapped); assert(r || GetLastError() == ERROR_NOT_FOUND); - if (!GetOverlappedResult(handle->handle, &req->u.io.overlapped, bytes_read, TRUE)) { + if (GetOverlappedResult(handle->handle, &req->u.io.overlapped, bytes_read, TRUE)) { + r = ERROR_SUCCESS; + } else { r = GetLastError(); *bytes_read = 0; }