From 00619d9868192a9112c261499fa47e3d981617cf Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Tue, 29 Sep 2026 21:22:57 +0100 Subject: [PATCH] clear interval --- .../extensions/redis-sync/redis-sync.extension.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/server/src/collaboration/extensions/redis-sync/redis-sync.extension.ts b/apps/server/src/collaboration/extensions/redis-sync/redis-sync.extension.ts index 42139097f..3a667f01f 100644 --- a/apps/server/src/collaboration/extensions/redis-sync/redis-sync.extension.ts +++ b/apps/server/src/collaboration/extensions/redis-sync/redis-sync.extension.ts @@ -235,13 +235,11 @@ export class RedisSyncExtension implements Extension { }; async maintainLock(documentName: string) { + clearInterval(this.locks[documentName]); this.locks[documentName] = setInterval(() => { - this.pub.set( - this.getKey(documentName), - this.serverId, - 'PX', - this.lockTTL, - ); + this.pub + .set(this.getKey(documentName), this.serverId, 'PX', this.lockTTL) + .catch(() => {}); }, this.lockTTL / 2); }