From 23206bc6838cca541e0a0c6200f557f6c5580c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 2 Dec 2021 15:26:43 +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 --- src/RpcJsonp.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RpcJsonp.php b/src/RpcJsonp.php index 3ae2c05..303d398 100644 --- a/src/RpcJsonp.php +++ b/src/RpcJsonp.php @@ -94,6 +94,9 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa */ public function consulWatches(OnWorkerStart|OnTaskerStart $server) { + if ($server->workerId != 0) { + return; + } Timer::tick(1000, static function () { Kiri::getDi()->get(RpcManager::class)->tick(); });