1
0
mirror of https://github.com/danog/process.git synced 2024-11-30 04:39:04 +01:00

Only reference watcher if running

This commit is contained in:
Aaron Piotrowski 2017-03-16 22:25:26 -05:00
parent a69d56bb1b
commit 9c8fe73b2c

View File

@ -238,7 +238,7 @@ class Process {
throw new StatusError("The process is not running"); throw new StatusError("The process is not running");
} }
if ($this->watcher !== null) { if ($this->watcher !== null && $this->running) {
Loop::reference($this->watcher); Loop::reference($this->watcher);
} }