mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
修复网关本地顶登录问题
This commit is contained in:
+10
-1
@@ -398,7 +398,15 @@ func (k *KcpConnectManager) getPlayerToken(req *proto.GetPlayerTokenReq, session
|
|||||||
return nil
|
return nil
|
||||||
case <-regFinishNotifyChan:
|
case <-regFinishNotifyChan:
|
||||||
}
|
}
|
||||||
// 顶号
|
oldSession := k.GetSessionByUserId(uid)
|
||||||
|
if oldSession != nil {
|
||||||
|
// 本地顶号
|
||||||
|
k.kcpEventInput <- &KcpEvent{
|
||||||
|
ConvId: oldSession.conn.GetConv(),
|
||||||
|
EventId: KcpConnRelogin,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 远程顶号
|
||||||
connCtrlMsg := new(mq.ConnCtrlMsg)
|
connCtrlMsg := new(mq.ConnCtrlMsg)
|
||||||
connCtrlMsg.KickUserId = uid
|
connCtrlMsg.KickUserId = uid
|
||||||
connCtrlMsg.KickReason = kcp.EnetServerRelogin
|
connCtrlMsg.KickReason = kcp.EnetServerRelogin
|
||||||
@@ -407,6 +415,7 @@ func (k *KcpConnectManager) getPlayerToken(req *proto.GetPlayerTokenReq, session
|
|||||||
EventId: mq.KickPlayerNotify,
|
EventId: mq.KickPlayerNotify,
|
||||||
ConnCtrlMsg: connCtrlMsg,
|
ConnCtrlMsg: connCtrlMsg,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
// 顶号等待
|
// 顶号等待
|
||||||
logger.Info("run global interrupt login kick wait, uid: %v", uid)
|
logger.Info("run global interrupt login kick wait, uid: %v", uid)
|
||||||
timer = time.NewTimer(time.Second * 10)
|
timer = time.NewTimer(time.Second * 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user