Skip to content

Commit

Permalink
Do not call uv_* functions on expired timers
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed May 15, 2017
1 parent 4029995 commit de783b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Loop/UvDriver.php
Expand Up @@ -89,7 +89,8 @@ public function __construct() {
$watcher = $this->watchers[(int) $event];

if ($watcher->type & Watcher::DELAY) {
$this->cancel($watcher->id);
unset($this->events[$watcher->id], $this->watchers[(int) $event]); // Avoid call to uv_is_active().
$this->cancel($watcher->id); // Remove reference to watcher in parent.
}

try {
Expand Down

0 comments on commit de783b8

Please sign in to comment.