From e443b25723cce87e6a6de1e3b2e551111d17bf9d Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 27 Feb 2021 03:28:44 +0800 Subject: [PATCH] modify --- HttpServer/Events/OnWorkerStart.php | 2 +- System/Snowflake.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 433d3453..eacc8ce2 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -72,7 +72,7 @@ class OnWorkerStart extends Callback Coroutine::sleep(1); } } - $server->stop(); + $server->stop($workerId, true); } catch (\Throwable $exception) { $this->addError($exception); } diff --git a/System/Snowflake.php b/System/Snowflake.php index ffd8799a..515db26e 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -245,7 +245,7 @@ class Snowflake public static function getMasterPid(): bool|string { $pid = Snowflake::app()->getSwoole()->setting['pid_file']; - + return file_get_contents($pid); }