Skip to content

Commit df06707

Browse files
committed
fix: should check if stream still exists
1 parent e85b438 commit df06707

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ export class Api {
300300
const roomName = computeRedisRoomStreamName(room, docid, this.prefix)
301301
const redisLastId = await this.getRedisLastId(room, docid)
302302
const lastId = number.parseInt(redisLastId.split('-')[0])
303+
const roomExists = await this.redis.exists(roomName)
304+
if (!roomExists) return
303305
if (remove) {
304306
await this.redis.del(roomName)
305307
} else {

0 commit comments

Comments
 (0)