From 5e352033c8d07842e8b2cc4a41d890963397ad63 Mon Sep 17 00:00:00 2001 From: Hazel K Date: Sat, 17 Aug 2024 10:00:27 -0400 Subject: [PATCH] fix error spam from ServerStatsService when running on Windows --- packages/backend/src/daemons/ServerStatsService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/daemons/ServerStatsService.ts b/packages/backend/src/daemons/ServerStatsService.ts index 2c70344c94..0be2149a0a 100644 --- a/packages/backend/src/daemons/ServerStatsService.ts +++ b/packages/backend/src/daemons/ServerStatsService.ts @@ -108,5 +108,6 @@ async function net() { // FS STAT async function fs() { - return await si.disksIO().catch(() => ({ rIO_sec: 0, wIO_sec: 0 })); + const io = await si.disksIO().catch(() => null); + return io ?? { rIO_sec: 0, wIO_sec: 0 }; }