redis:玩家退出时,添加防报错
This commit is contained in:
@@ -366,7 +366,7 @@ export async function roleLeave(roleId: string) {
|
||||
if(count <= 0) {
|
||||
await redisClient().hdelAsync(REDIS_KEY.ONLINE_CNT, roleId);
|
||||
await redisClient().hdelAsync(REDIS_KEY.ONLINE_USERS, roleId);
|
||||
await redisClient().hdelAsync(REDIS_KEY.USER_CODE, role.userCode);
|
||||
if(role) await redisClient().hdelAsync(REDIS_KEY.USER_CODE, role.userCode);
|
||||
await redisClient().hdelAsync(REDIS_KEY.ONLINE_CNT, roleId);
|
||||
}
|
||||
return role;
|
||||
|
||||
Reference in New Issue
Block a user