diff --git a/src/windows/wslrelay/main.cpp b/src/windows/wslrelay/main.cpp index 6de886d3..6d16b88e 100644 --- a/src/windows/wslrelay/main.cpp +++ b/src/windows/wslrelay/main.cpp @@ -61,7 +61,13 @@ try // Ensure that the other end of the pipe has connected if required. if (connectPipe) { - wsl::windows::common::helpers::ConnectPipe(pipe.get(), (15 * 1000), {exitEvent.get()}); + std::vector exitEvents; + if (exitEvent) + { + exitEvents.push_back(exitEvent.get()); + } + + wsl::windows::common::helpers::ConnectPipe(pipe.get(), (15 * 1000), exitEvents); } // Perform the requested operation.