From b495927099d21e8fe57e6c8b6d88d84caeb3bbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 8 Jun 2022 14:27:49 +0800 Subject: [PATCH] modify plugin name --- RpcJsonp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RpcJsonp.php b/RpcJsonp.php index 75136c5..a10b0ee 100644 --- a/RpcJsonp.php +++ b/RpcJsonp.php @@ -95,9 +95,10 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa */ public function onBeforeShutdown(OnBeforeShutdown $beforeShutdown): void { - if ($beforeShutdown->server->worker_id != 0) { + if (env('environmental_workerId') != 0) { return; } + $agent = $this->container->get(Agent::class); $value = Config::get("rpc.consul", []); if (empty($value)) {