From df067079eb8d12d0592044b37348841fb7c68e8a Mon Sep 17 00:00:00 2001 From: stanley2058 Date: Sat, 25 Jan 2025 14:14:52 +0800 Subject: [PATCH] fix: should check if stream still exists --- src/api.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api.js b/src/api.js index e712ff6..155e51f 100644 --- a/src/api.js +++ b/src/api.js @@ -300,6 +300,8 @@ export class Api { const roomName = computeRedisRoomStreamName(room, docid, this.prefix) const redisLastId = await this.getRedisLastId(room, docid) const lastId = number.parseInt(redisLastId.split('-')[0]) + const roomExists = await this.redis.exists(roomName) + if (!roomExists) return if (remove) { await this.redis.del(roomName) } else {