diff --git a/Spawn/Future.php b/Spawn/Future.php index 672e23d..23817ce 100644 --- a/Spawn/Future.php +++ b/Spawn/Future.php @@ -487,7 +487,6 @@ public function stop(int $signal = \SIGKILL): FutureInterface $this->process->stop(0, $signal); } - $this->status = false; return $this; } diff --git a/tests/SpawnTest.php b/tests/SpawnTest.php index 1c3060e..0e5cd55 100644 --- a/tests/SpawnTest.php +++ b/tests/SpawnTest.php @@ -252,7 +252,7 @@ public function testSignal() }); $future->stop(); - $this->assertFalse($future->isRunning()); + $this->assertTrue($future->isRunning()); $future->run(); $this->assertFalse($future->isRunning()); $this->assertFalse($future->isSuccessful()); @@ -273,7 +273,7 @@ public function testSignalYield() }); $future->stop(); - $this->assertFalse($future->isRunning()); + $this->assertTrue($future->isRunning()); $yield = $future->yielding(); $this->assertTrue($yield instanceof \Generator); $this->assertNull($yield->current());