This commit is contained in:
meixiongfeng 2022-12-13 11:04:52 +08:00
commit 02d45f08ba

View File

@ -56,7 +56,7 @@ func (this *clientComp) Shutdown(c *client) {
this.module.Errorf("战斗校验服务%d 被关闭! ", c.index) 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 ( var (
c *client 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)} c = &client{mgr: mgr, log: log, index: i, state: 1, pending: make(map[uint64]*MessageCall)}
dialer := websocket.Dialer{} dialer := websocket.Dialer{}
c.conn, _, err = dialer.Dial(addr, nil) c.conn, _, err = dialer.Dial(addr, nil)
go c.run()
return return
} }
@ -158,6 +159,7 @@ locp:
this.log.Errorf("client Unmarshal err:%v", err) this.log.Errorf("client Unmarshal err:%v", err)
continue continue
} }
this.log.Debugf("接收战斗校验结果:%v", msg)
go this.handleresponse(msg) go this.handleresponse(msg)
} }
} }