From b7667d74acf564e301695f78ff00bba7619d5c5b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 12 Dec 2022 19:48:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E8=BF=9E=E6=8E=A5=E6=B6=88=E6=81=AF=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battle/clients.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/battle/clients.go b/modules/battle/clients.go index 5b1157fbd..99261756c 100644 --- a/modules/battle/clients.go +++ b/modules/battle/clients.go @@ -56,7 +56,7 @@ func (this *clientComp) Shutdown(c *client) { this.module.Errorf("战斗校验服务%d 被关闭! ", c.index) } -func (this *clientComp) CheckBattle(ctx context.Context, req proto.Message) (reply *pb.BattleCheckResults, err error) { +func (this *clientComp) CheckBattle(ctx context.Context, req *pb.BattleReport) (reply *pb.BattleCheckResults, err error) { var ( c *client ) @@ -87,6 +87,7 @@ func newClient(addr string, i int, mgr IClientMgr, log log.ILogger) (c *client, c = &client{mgr: mgr, log: log, index: i, state: 1, pending: make(map[uint64]*MessageCall)} dialer := websocket.Dialer{} c.conn, _, err = dialer.Dial(addr, nil) + go c.run() return } @@ -158,6 +159,7 @@ locp: this.log.Errorf("client Unmarshal err:%v", err) continue } + this.log.Debugf("接收战斗校验结果:%v", msg) go this.handleresponse(msg) } }