From cff6bba499c33aedbe739b41df1a160ab378ca78 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Thu, 5 Nov 2020 10:16:30 -0600 Subject: [PATCH] Missed an Awaitable usage --- lib/Internal/ResolutionQueue.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Internal/ResolutionQueue.php b/lib/Internal/ResolutionQueue.php index ff5af70..0895977 100644 --- a/lib/Internal/ResolutionQueue.php +++ b/lib/Internal/ResolutionQueue.php @@ -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 {