From a47ca241c6f7b73c2df834a84bfc0e33dd756d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 29 Oct 2021 18:28:39 +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/Annotation/JsonRpc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Annotation/JsonRpc.php b/src/Annotation/JsonRpc.php index ea0cd21..56e13cc 100644 --- a/src/Annotation/JsonRpc.php +++ b/src/Annotation/JsonRpc.php @@ -54,11 +54,11 @@ use ReflectionException; */ protected function create(): array { - $content = swoole_get_local_ip()['eth0']; + $content = current(swoole_get_local_ip()); return [ "id" => uniqid("rpc.json.{$this->method}."), "name" => $this->method, - "address" => swoole_get_local_ip()['eth0'], + "address" => $content, "port" => 9526, "enableTagOverride" => true, "check" => [