1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 17:37:50 +01:00

Missed an Awaitable usage

This commit is contained in:
Aaron Piotrowski 2020-11-05 10:16:30 -06:00
parent 8d8358023f
commit cff6bba499
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -67,12 +67,8 @@ final class ResolutionQueue
try {
$result = $callback($exception, $value);
if ($result instanceof \Awaitable) {
$result->onResolve(static function (?\Throwable $exception): void {
if ($exception) {
throw $exception;
}
});
if ($result instanceof Promise) {
Promise\rethrow($result);
}
} catch (\Throwable $exception) {
Loop::defer(static function () use ($exception): void {