From bcbbb1863bdce29ce2267cd6a016f2fc8a2c59bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 21 Oct 2020 14:55:58 +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/OnStart.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/HttpServer/Events/OnStart.php b/HttpServer/Events/OnStart.php index 0e9d03a3..9a59c472 100644 --- a/HttpServer/Events/OnStart.php +++ b/HttpServer/Events/OnStart.php @@ -8,6 +8,8 @@ use HttpServer\Abstracts\Callback; use Snowflake\Abstracts\Config; use Snowflake\Event; use Snowflake\Snowflake; +use Swoole\Coroutine\System; +use Swoole\Process; use Swoole\Server; class OnStart extends Callback @@ -17,7 +19,7 @@ class OnStart extends Callback * @param Server $server * @throws \Exception */ - public function onHandler($server) + public function onHandler(Server $server) { Snowflake::setProcessId($server->master_pid); @@ -27,6 +29,9 @@ class OnStart extends Callback if (Snowflake::isLinux()) { name(rtrim(Config::get('id', 'system:'), ':')); } + while ($ret = System::wait()) { + var_dump($ret); + } } }