From 5beb32e8793944885beb398eee2191b7bf3cd720 Mon Sep 17 00:00:00 2001 From: v Date: Mon, 1 Sep 2025 19:42:16 +0800 Subject: [PATCH] up. --- app/command/admin/SysGateway.php | 2 +- config/admin.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/command/admin/SysGateway.php b/app/command/admin/SysGateway.php index 8cbcda4..c9bd6a3 100644 --- a/app/command/admin/SysGateway.php +++ b/app/command/admin/SysGateway.php @@ -80,7 +80,7 @@ class SysGateway extends Command $gateway->lanIp = '127.0.0.1'; // 内部通讯起始端口。假如$gateway->count=2,起始端口为2300 // 则一般会使用2300 2301 2个端口作为内部通讯端口 - $gateway->startPort = 2300; + $gateway->startPort = (int)config('admin.gateway.startPort', 2300); // 心跳间隔 $gateway->pingInterval = 10; // 心跳数据 diff --git a/config/admin.php b/config/admin.php index 3f6d82e..a750753 100644 --- a/config/admin.php +++ b/config/admin.php @@ -22,5 +22,6 @@ return [ 'gateway' => [ 'websocketAddress' => env('GATEWAY_WEBSOCKET_ADDRESS','0.0.0.0:19981'), 'registerAddress'=> env('GATEWAY_REGISTER_ADDRESS', '127.0.0.1:1236'), + 'startPort' => (int)env('GATEWAY_START_PORT', 2300) ] ]; \ No newline at end of file