1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 04:24:42 +01:00

Always put the watcher back upon re-activation

This commit is contained in:
Bob Weinand 2016-12-30 00:55:06 +01:00 committed by GitHub
parent 97ac5a1b1f
commit 26a707ed94

View File

@ -167,9 +167,10 @@ class UvLoop extends Loop {
$event = $this->events[$id];
} else {
$event = $this->events[$id] = \uv_timer_init($this->handle);
$this->watchers[(int) $event] = $watcher;
}
$this->watchers[(int) $event] = $watcher;
\uv_timer_start(
$event,
$watcher->value,
@ -183,8 +184,9 @@ class UvLoop extends Loop {
$event = $this->events[$id];
} else {
$event = $this->events[$id] = \uv_signal_init($this->handle);
$this->watchers[(int) $event] = $watcher;
}
$this->watchers[(int) $event] = $watcher;
\uv_signal_start($event, $this->signalCallback, $watcher->value);
break;