1
0
mirror of https://github.com/danog/amp.git synced 2025-01-21 21:01:16 +01:00

Avoid unnecessary uv_timer_stop() when cleaning up once timers

This commit is contained in:
Daniel Lowrey 2014-12-05 00:09:47 -05:00
parent 49b7a73a8d
commit bbfca9f7ac

View File

@ -220,6 +220,7 @@ class UvReactor implements SignalReactor {
$this->resolveGenerator($result)->when($this->onCallbackResolution);
}
if ($watcher->type === Watcher::TIMER_ONCE) {
$watcher->isEnabled = false;
$this->clearWatcher($watcher->id);
}
} catch (\Exception $e) {