From 9152b1bda4cac21631b696639bc18e9931d29ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 20 Aug 2015 10:47:55 +0200 Subject: [PATCH] win: reset pipe handle for pipe servers On pipe servers handle->handle takes turns between the different server handles, so after closing all of them just reset the dandling reference. PR-URL: https://github.com/libuv/libuv/pull/488 Reviewed-By: Ben Noordhuis --- src/win/pipe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win/pipe.c b/src/win/pipe.c index 06cf0db2..7cce9bee 100644 --- a/src/win/pipe.c +++ b/src/win/pipe.c @@ -748,6 +748,7 @@ void uv_pipe_cleanup(uv_loop_t* loop, uv_pipe_t* handle) { handle->pipe.serv.accept_reqs[i].pipeHandle = INVALID_HANDLE_VALUE; } } + handle->handle = INVALID_HANDLE_VALUE; } if (handle->flags & UV_HANDLE_CONNECTION) {