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:
parent
8d8358023f
commit
cff6bba499
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user