Revert "登录:多地登陆拦截"

This reverts commit f7dcf1b130.
This commit is contained in:
luying
2022-06-13 15:11:48 +08:00
parent f7dcf1b130
commit 68e5d11230
2 changed files with 6 additions and 3 deletions
@@ -55,8 +55,12 @@ export class EntryHandler {
let connect = await getRoleOnlineInfo(role.roleId);
if (connect.isOnline) { // 多地登陆拦截
return resResult(STATUS.LOGIN_DUPLICATE);
if (connect.isOnline) { // 多地登陆踢下线
if (connect.sid = self.app.getServerId()) {
await kickUser(self.app, role.roleId);
} else {
await self.app.rpc.connector.connectorRemote.remoteLogin.toServer(connect.sid, role.roleId);
}
}
let serverName = this.app.getServerId();
await roleLogin(role.roleId, user.userCode, serverName, user.pkgName, role.createTime, role.serverId); // 保存在线用户