This commit is contained in:
@@ -24,7 +24,7 @@ func (h Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.L
|
||||
defer c.Close()
|
||||
return
|
||||
}
|
||||
isSessionValid := data.CheakSession()
|
||||
isSessionValid, hashcode := data.CheakSession()
|
||||
if !isSessionValid {
|
||||
|
||||
defer c.Close()
|
||||
@@ -38,12 +38,14 @@ func (h Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.L
|
||||
return
|
||||
}
|
||||
currentPlayer := player.GetPlayer(c, data.Head.UserID)
|
||||
|
||||
if currentPlayer == nil {
|
||||
cool.Logger.Error(context.Background(), "获取玩家失败", data.Head.UserID)
|
||||
|
||||
defer c.Close()
|
||||
return
|
||||
}
|
||||
currentPlayer.Hash = hashcode
|
||||
currentPlayer.Service = service.NewUserService(data.Head.UserID)
|
||||
|
||||
currentPlayer.Info = currentPlayer.Service.Info.SetLogin()
|
||||
|
||||
Reference in New Issue
Block a user