diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 7a0bb3b5..6cbe0e5f 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -68,7 +68,9 @@ class OnWorkerStart extends Callback { $this->debug(sprintf(workerName($worker_id) . ' #%d is start.....', $worker_id)); Coroutine\go(function (Server $server, $worker_id) { - Coroutine::waitSignal($this->signal); + if (!Coroutine::waitSignal($this->signal)) { + return 0; + } while (Snowflake::app()->isRun()) { Coroutine::sleep(1); }