1
0
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:
Aaron Piotrowski 2019-03-08 11:26:48 -06:00
parent 2191d1145b
commit c1f6b62799
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -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;
}