mirror of
https://github.com/danog/parallel.git
synced 2024-11-29 20:29:00 +01:00
Check if watcher has already been cancelled
This seems to only happen in 7.1 for some reason… will perhaps need to dig further into why.
This commit is contained in:
parent
2191d1145b
commit
c1f6b62799
@ -283,7 +283,7 @@ final class Parallel implements Context
|
||||
|
||||
unset(self::$futures[$this->id], self::$channels[$this->id]);
|
||||
|
||||
if (empty(self::$futures)) {
|
||||
if (empty(self::$futures) && self::$watcher !== null) {
|
||||
Loop::cancel(self::$watcher);
|
||||
self::$watcher = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user