1
0
mirror of https://github.com/danog/amp.git synced 2024-11-26 20:15:00 +01:00

NativeReactor needs to always end in stopped state

(under normal circumstances)
This commit is contained in:
Bob Weinand 2016-03-08 12:14:08 +01:00
parent a78cc09dac
commit d3212d4638
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
### 1.0.9
- Fix NativeReactor not ending up in stopped state if primary
callback didn't install any events.
### 1.0.8
- Fix NativeReactor running a busy loop if no timers are active.

View File

@ -58,6 +58,7 @@ class NativeReactor implements Reactor {
$this->state = self::STARTING;
$watcherId = $this->immediately($onStart);
if (!$this->tryImmediate($this->watchers[$watcherId]) || empty($this->keepAliveCount)) {
$this->state = self::STOPPED;
return;
}
} else {