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

Unreference watcher in Amp\timout()

This commit is contained in:
Aaron Piotrowski 2016-12-17 08:28:19 -06:00
parent 8ef760f53c
commit bc1ae1822c

View File

@ -398,6 +398,7 @@ function timeout(Promise $promise, int $timeout): Promise {
$deferred->fail(new TimeoutException);
}
});
Loop::unreference($watcher);
$promise->when(function () use (&$resolved, $promise, $deferred, $watcher) {
Loop::cancel($watcher);