mirror of
https://github.com/danog/amp.git
synced 2025-01-22 05:11:42 +01:00
Always use persistent flag for timer
cancel() is called when delay timers are executed anyway, so it doesn't matter what the flags are for the event.
This commit is contained in:
parent
9073f6c999
commit
bb51720818
@ -138,14 +138,10 @@ class EventLoop extends Loop {
|
||||
|
||||
case Watcher::DELAY:
|
||||
case Watcher::REPEAT:
|
||||
$flags = \Event::TIMEOUT;
|
||||
if ($watcher->type === Watcher::REPEAT) {
|
||||
$flags |= \Event::PERSIST;
|
||||
}
|
||||
$this->events[$id] = new \Event(
|
||||
$this->handle,
|
||||
-1,
|
||||
$flags,
|
||||
\Event::TIMEOUT | \Event::PERSIST,
|
||||
$this->timerCallback,
|
||||
$watcher
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user