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) } }