From b2ce7302612e5f083f6c495b465fbae40d45eb48 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Thu, 1 Feb 2018 09:34:10 +0100 Subject: [PATCH] Use failHandleStart() on process connect timeout on Windows --- lib/Internal/Windows/SocketConnector.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/Internal/Windows/SocketConnector.php b/lib/Internal/Windows/SocketConnector.php index 0cb9648..9c96797 100644 --- a/lib/Internal/Windows/SocketConnector.php +++ b/lib/Internal/Windows/SocketConnector.php @@ -337,19 +337,10 @@ final class SocketConnector { } $error = $error ?: 'Process did not connect to server before timeout elapsed'; - foreach ($handle->sockets as $socket) { - \fclose($socket); - } - - $error = new ProcessException(\trim($error)); - foreach ($handle->stdioDeferreds as $deferred) { - $deferred->fail($error); - } - \fclose($handle->wrapperStderrPipe); \proc_close($handle->proc); - $handle->joinDeferred->fail($error); + $this->failHandleStart($error); } public function registerPendingProcess(Handle $handle) {