Skip to content

Commit

Permalink
Update Future.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed May 25, 2021
1 parent 66ffef3 commit 29efad3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Spawn/Future.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,10 @@ public function isTerminated(): bool
{
if ($this->process instanceof \UVProcess)
return ($this->status === false) || \is_string($this->status);
elseif ($this->process instanceof Process)
return $this->process->isTerminated();

return $this->process instanceof Process && $this->process->isTerminated();
return $this->status === false || \is_string($this->status);
}

public function isStarted(): bool
Expand Down

0 comments on commit 29efad3

Please sign in to comment.