diff --git a/lib/core-net/close.c b/lib/core-net/close.c index a8dc95274c..68e874e684 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -921,7 +921,10 @@ __lws_close_free_wsi_final(struct lws *wsi) if (pt->pipe_wsi == wsi) pt->pipe_wsi = NULL; if (pt->dummy_pipe_fds[0] == wsi->desc.sockfd) + { pt->dummy_pipe_fds[0] = LWS_SOCK_INVALID; + compatible_close(pt->dummy_pipe_fds[1]); + } } wsi->desc.sockfd = LWS_SOCK_INVALID;