优化代码

This commit is contained in:
flswld
2023-02-18 22:09:59 +08:00
parent 21fb9d400f
commit e580baeb46
37 changed files with 198 additions and 118 deletions

View File

@@ -191,11 +191,10 @@ func (k *KcpConnectManager) sendMsgHandle() {
})
} else if protoMsg.CmdId == cmd.ClientReconnectNotify {
tokenResetRsp, err := httpclient.PostJson[controller.TokenResetRsp](
config.CONF.Hk4e.LoginSdkUrl+"/gate/token/reset?key=flswld",
config.GetConfig().Hk4e.LoginSdkUrl+"/gate/token/reset?key=flswld",
&controller.TokenResetReq{
PlayerId: session.userId,
},
"")
})
if err != nil {
logger.Error("reset token error: %v", err)
k.kcpEventInput <- &KcpEvent{
@@ -343,12 +342,11 @@ func (k *KcpConnectManager) getPlayerToken(req *proto.GetPlayerTokenReq, session
}
}
tokenVerifyRsp, err := httpclient.PostJson[controller.TokenVerifyRsp](
config.CONF.Hk4e.LoginSdkUrl+"/gate/token/verify?key=flswld",
config.GetConfig().Hk4e.LoginSdkUrl+"/gate/token/verify?key=flswld",
&controller.TokenVerifyReq{
AccountId: req.AccountUid,
AccountToken: req.AccountToken,
},
"")
})
if err != nil {
logger.Error("verify token error: %v, account uid: %v", err, req.AccountUid)
loginFailClose()