From b09f1107a484bfb0dea088f2d94239c9dc6a4d15 Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Fri, 17 Jul 2026 15:38:00 -0700 Subject: [PATCH] Fix debug log in initial unlinked state --- ts/windows/main/phase1-ipc.preload.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ts/windows/main/phase1-ipc.preload.ts b/ts/windows/main/phase1-ipc.preload.ts index f73610da93..b995eca5ee 100644 --- a/ts/windows/main/phase1-ipc.preload.ts +++ b/ts/windows/main/phase1-ipc.preload.ts @@ -249,9 +249,19 @@ ipc.on('additional-log-data-request', async event => { statistics = {}; } - let networkStatistics: NetworkStatistics = { - signalConnectionCount: formatCountForLogging(getSignalConnections().length), - }; + let networkStatistics: NetworkStatistics; + try { + networkStatistics = { + signalConnectionCount: formatCountForLogging( + getSignalConnections().length + ), + }; + } catch (error) { + networkStatistics = { + signalConnectionCount: undefined, + }; + } + const unauthorizedStats = AggregatedStats.loadOrCreateEmpty( UNAUTHENTICATED_CHANNEL_NAME );