From 1ef7ac47a5804cb2dbc818bcb720d1ed6ad406cd Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Fri, 2 Feb 2024 21:33:04 +0100 Subject: [PATCH] Fix UnhandledFutureError if reading exit code fails Relates to #69. --- src/Internal/Windows/SocketConnector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Internal/Windows/SocketConnector.php b/src/Internal/Windows/SocketConnector.php index f3018f7..cb11917 100644 --- a/src/Internal/Windows/SocketConnector.php +++ b/src/Internal/Windows/SocketConnector.php @@ -102,7 +102,7 @@ public function connectPipes(WindowsHandle $handle, Cancellation $cancellation): $exitCode = $this->readExitCode($handle->exitCodeStream); $handle->joinDeferred->complete($exitCode); - } catch (HandshakeException) { + } catch (\Throwable) { $handle->joinDeferred->error(new ProcessException("Failed to read exit code from process wrapper")); } finally { $handle->status = ProcessStatus::Ended;