From cc2448b91f4bc627dbad3ae07dae486d0466b1e7 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 27 Aug 2023 18:05:14 +0200 Subject: [PATCH] Fix tests --- server/server_system.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/server_system.ts b/server/server_system.ts index 2b2abbfc..098bea18 100644 --- a/server/server_system.ts +++ b/server/server_system.ts @@ -37,6 +37,7 @@ export class ServerSystem { spacePrimitives!: SpacePrimitives; private requeueInterval?: number; kvStore?: DenoKVStore; + listInterval?: number; constructor( private baseSpacePrimitives: SpacePrimitives, @@ -122,7 +123,7 @@ export class ServerSystem { markdownSyscalls(buildMarkdown(loadMarkdownExtensions(this.system))), ); - setInterval(() => { + this.listInterval = setInterval(() => { space.updatePageList().catch(console.error); }, fileListInterval); @@ -169,6 +170,7 @@ export class ServerSystem { async close() { clearInterval(this.requeueInterval); + clearInterval(this.listInterval); await this.system.unloadAll(); } }