From 4b3173922e28c46297a7c70b180cd61a9062da49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 7 Sep 2020 16:10:29 +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/OnManagerStart.php | 2 +- System/Process/ServerInotify.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Events/OnManagerStart.php b/HttpServer/Events/OnManagerStart.php index a37aafaa..7584e21a 100644 --- a/HttpServer/Events/OnManagerStart.php +++ b/HttpServer/Events/OnManagerStart.php @@ -19,7 +19,7 @@ class OnManagerStart extends Callback public function onHandler(Server $server) { $this->debug('manager start.'); - Snowflake::setProcessId($server->manager_pid); + Snowflake::setWorkerId($server->manager_pid); $events = Snowflake::app()->event; if ($events->exists(Event::SERVER_MANAGER_START)) { diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 1e75cbfa..14810a34 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -39,7 +39,7 @@ class ServerInotify extends Process */ public function onHandler(\Swoole\Process $process) { - Snowflake::setProcessId($process->pid); + Snowflake::setWorkerId($process->pid); set_error_handler([$this, 'onErrorHandler']); if (extension_loaded('inotify')) { $this->inotify = inotify_init();