From 4c10dbf211c627996fe7026c0ef46685e07fa8bf Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Thu, 31 Jul 2025 08:29:37 +0000 Subject: [PATCH] =?UTF-8?q?"refactor(rpc):=20=E7=A7=BB=E9=99=A4=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E6=A3=80=E6=9F=A5=E6=9D=A1=E4=BB=B6=EF=BC=8C=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=B3=A8=E5=86=8C=E9=80=BB=E8=BE=91=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E9=87=8D=E8=BF=9E=E6=B3=A8=E9=87=8A?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/rpc/rpc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/rpc/rpc.go b/common/rpc/rpc.go index 607702a5..acfb63a3 100644 --- a/common/rpc/rpc.go +++ b/common/rpc/rpc.go @@ -92,16 +92,16 @@ func StartClient(id, port uint16, callback any) *struct { "ws://"+rpcaddr, "", []interface{}{ &RPCClient, }, nil, jsonrpc.WithClientHandler("", callback), - jsonrpc.WithReconnFun(func() { RPCClient.RegisterLogic(id, port) }), + jsonrpc.WithReconnFun(func() { RPCClient.RegisterLogic(id, port) }),//TODO ,这里会出现server0注册? ) if err != nil { log.Fatalf("Failed to create client: %v", err) } - if port != 0 { //注册logic + //if port != 0 { //注册logic RPCClient.RegisterLogic(id, port) - } + //} closer = closer1 return &RPCClient