mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Unreference watcher in Amp\timout()
This commit is contained in:
parent
8ef760f53c
commit
bc1ae1822c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user