From a0eddbbcc171ccb5eb9502d0747a73fea8f6a365 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 28 Feb 2021 18:17:43 +0800 Subject: [PATCH] modify --- HttpServer/Events/OnWorkerStart.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 5c0f1e26..cd64822e 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -99,7 +99,9 @@ class OnWorkerStart extends Callback public function onSignal($server, $worker_id) { $env = ucfirst(Snowflake::getEnvironmental()); - while (Coroutine::waitSignal($this->signal, -1)) { + + $receive = Coroutine::waitSignal($this->signal, -1); + while ($receive === true) { if ($this->isPrint === false) { $this->warning(sprintf('Receive %s#%d stop event.', $env, $worker_id)); $this->isPrint = true;