mirror of
https://github.com/danog/amp.git
synced 2024-11-27 04:24:42 +01:00
Fix endless native loop when no watchers remain
This commit is contained in:
parent
112eee97bf
commit
b0a76277bb
@ -72,6 +72,8 @@ class NativeReactor implements Reactor {
|
||||
|
||||
if ($this->readStreams || $this->writeStreams) {
|
||||
$this->selectActionableStreams($timeToNextAlarm);
|
||||
} elseif (!$this->alarmOrder) {
|
||||
$this->stop();
|
||||
} elseif ($timeToNextAlarm > 0) {
|
||||
usleep($timeToNextAlarm * self::$MICROSECOND);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user