From 0b1b831d7d6c00e9d191aea261072e1607813389 Mon Sep 17 00:00:00 2001 From: liangtongchuan Date: Sun, 7 Mar 2021 14:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8A=E5=A4=A9=EF=BC=9A=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=90=8E=E9=87=8D=E7=BD=AE=E9=A2=91?= =?UTF-8?q?=E9=81=93=20sid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app.ts | 1 + game-server/app/services/redisService.ts | 5 +++++ 2 files changed, 6 insertions(+) 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