diff --git a/game-server/app.ts b/game-server/app.ts index 54565f2f4..0c18d760b 100644 --- a/game-server/app.ts +++ b/game-server/app.ts @@ -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); } diff --git a/game-server/app/services/redisService.ts b/game-server/app/services/redisService.ts index 36b0f0c0d..e856fe0ff 100644 --- a/game-server/app/services/redisService.ts +++ b/game-server/app/services/redisService.ts @@ -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