diff --git a/src/Process.php b/src/Process.php index 5fd28c1..609b99c 100644 --- a/src/Process.php +++ b/src/Process.php @@ -110,7 +110,7 @@ public function start(LoopInterface $loop, $interval = 0.1) return; } - $loop->addPeriodicTimer($interval, function (TimerInterface $timer) { + $loop->addPeriodicTimer($this->isRunning() ? $interval : 0, function (TimerInterface $timer) { if (!$this->isRunning()) { $this->close(); $timer->cancel();