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 {
|
try {
|
||||||
$result = $callback($exception, $value);
|
$result = $callback($exception, $value);
|
||||||
|
|
||||||
if ($result instanceof \Awaitable) {
|
if ($result instanceof Promise) {
|
||||||
$result->onResolve(static function (?\Throwable $exception): void {
|
Promise\rethrow($result);
|
||||||
if ($exception) {
|
|
||||||
throw $exception;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
Loop::defer(static function () use ($exception): void {
|
Loop::defer(static function () use ($exception): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user