聊天:启动服务器后重置频道 sid

This commit is contained in:
liangtongchuan
2021-03-07 14:44:35 +08:00
parent 5842723458
commit 0b1b831d7d
2 changed files with 6 additions and 0 deletions

View File

@@ -71,6 +71,7 @@ app.configure(function() {
redisService.readDataBase();
redisService.initAllRank();
redisService.clearComBtlQueue();
redisService.clearChannelServers();
updateTeamStatus(COM_TEAM_STATUS.DEFAULT, COM_TEAM_STATUS.LOOSE);
updateTeamStatus(COM_TEAM_STATUS.FIGHTING, COM_TEAM_STATUS.LOOSE);
}

View File

@@ -355,6 +355,11 @@ export async function addRedisChannel(roomId: string, sid: string) {
return result;
}
export async function clearChannelServers() {
const result = await redisClient().delAsync(REDIS_KEY.CHANNEL_SERVERS);
return result;
}
/**
* 玩家上线
* @param roleId role表id