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) {