修正清理roomcount信息时, 有时报对象为空的bug
This commit is contained in:
parent
925976cbae
commit
a0c57268d2
@ -141,11 +141,12 @@ export class Service {
|
|||||||
const nodes = nodeStrs.map(data => parseNode(data))
|
const nodes = nodeStrs.map(data => parseNode(data))
|
||||||
const nodeMap = nodes.toMap('processId')
|
const nodeMap = nodes.toMap('processId')
|
||||||
const countObjs = await client.hgetall(ROOM_COUNT_KEY)
|
const countObjs = await client.hgetall(ROOM_COUNT_KEY)
|
||||||
for (let key of Object.keys(countObjs)) {
|
if (countObjs) {
|
||||||
if (!nodeMap.has(key)) {
|
for (let key of Object.keys(countObjs)) {
|
||||||
await client.hdel(ROOM_COUNT_KEY, key)
|
if (!nodeMap.has(key)) {
|
||||||
|
await client.hdel(ROOM_COUNT_KEY, key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user