From eecc238a3da5e3dccaa75efbe8f864d5a70bd6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 26 Feb 2021 18:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Events/OnWorkerStart.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index a867ac88..cc39d3c8 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -57,10 +57,11 @@ class OnWorkerStart extends Callback return; } while (true) { - if (!isset(Coroutine::getContext(Coroutine::getPcid())['isComplete'])) { + $context = Coroutine::getContext(Coroutine::getPcid()); + if (!isset($context['isComplete'])) { break; } - $content = Coroutine::getContext(Coroutine::getPcid())['isComplete']; + $content = $context['isComplete']; if ($content === true) { break; }