Skip to content

Commit c2dc0e2

Browse files
committed
fix: don't delete stream if empty
1 parent c39f90d commit c2dc0e2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/api.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,7 @@ export class Api {
304304
const roomName = computeRedisRoomStreamName(room, docid, this.prefix)
305305
const redisLastId = await this.getRedisLastId(room, docid)
306306
const lastId = number.parseInt(redisLastId.split('-')[0])
307-
await this.redis.multi()
308-
.xTrim(roomName, 'MINID', lastId - this.redisMinMessageLifetime)
309-
.xDelIfEmpty(roomName)
310-
.exec()
307+
await this.redis.xTrim(roomName, 'MINID', lastId - this.redisMinMessageLifetime)
311308
}
312309

313310
/**

0 commit comments

Comments
 (0)