From 403452c321a517d82624cca4f57306e72a7eb624 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Sun, 17 Sep 2017 19:16:18 +0200 Subject: [PATCH] Fix ProcessInputStream --- lib/ProcessInputStream.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ProcessInputStream.php b/lib/ProcessInputStream.php index ec43048..d152aa8 100644 --- a/lib/ProcessInputStream.php +++ b/lib/ProcessInputStream.php @@ -27,7 +27,9 @@ class ProcessInputStream implements InputStream { $resourceStreamPromise->onResolve(function ($error, $resourceStream) { if ($error) { $this->error = new StreamException("Failed to launch process", 0, $error); - $this->initialRead->fail($this->error); + if ($this->initialRead) { + $this->initialRead->fail($this->error); + } return; }