diff --git a/common/rpc/rpc.go b/common/rpc/rpc.go index 607702a5c..acfb63a35 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