From e3ad9623605d64aab04ed79fa3b2d0e8576c35ee Mon Sep 17 00:00:00 2001 From: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com> Date: Fri, 28 Jul 2023 02:04:52 -0700 Subject: [PATCH] Update ds-ipc-pal-namedpipe to fix shutdown race --- src/native/eventpipe/ds-ipc-pal-namedpipe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/native/eventpipe/ds-ipc-pal-namedpipe.c b/src/native/eventpipe/ds-ipc-pal-namedpipe.c index 1bd3a20227720..6802d5aa28d42 100644 --- a/src/native/eventpipe/ds-ipc-pal-namedpipe.c +++ b/src/native/eventpipe/ds-ipc-pal-namedpipe.c @@ -635,10 +635,8 @@ ds_ipc_close ( { EP_ASSERT (ipc != NULL); - // don't attempt cleanup on shutdown and let the OS handle it - // except in the case of listen pipes - if they leak the process - // will fail to reinitialize the pipe for embedding scenarios. - if (is_shutdown && ipc->mode != DS_IPC_CONNECTION_MODE_LISTEN) { + // don't attempt cleanup on shutdown and let the OS handle it. + if (is_shutdown) { if (callback) callback ("Closing without cleaning underlying handles", 100); return;