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();