From c2161b3524b5bfcce61c9d4caee5a98111777d42 Mon Sep 17 00:00:00 2001 From: ianshade Date: Fri, 13 Jun 2025 01:03:18 +0200 Subject: [PATCH] fix(EAV-624): make debug logging work and not cause infinite updates --- .../src/service/ConnectionManager.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/timeline-state-resolver/src/service/ConnectionManager.ts b/packages/timeline-state-resolver/src/service/ConnectionManager.ts index 84e0582734..3e1646af19 100644 --- a/packages/timeline-state-resolver/src/service/ConnectionManager.ts +++ b/packages/timeline-state-resolver/src/service/ConnectionManager.ts @@ -108,10 +108,7 @@ export class ConnectionManager extends EventEmitter { // see if it should be restarted because of an update if (connectionConfigHasChanged(connection, config)) { operations.push({ operation: 'update', id: deviceId }) - } else if ( - connection.deviceOptions.debug !== config.debug || - connection.deviceOptions.debugState !== config.debugState - ) { + } else if (connection.debugLogging !== !!config.debug || connection.debugState !== !!config.debugState) { // see if we should set the debug params operations.push({ operation: 'setDebug', id: deviceId }) } @@ -304,8 +301,8 @@ export class ConnectionManager extends EventEmitter { if (!connection || !config) return try { - await connection.device.setDebugLogging(config.debug ?? false) - await connection.device.setDebugState(config.debugState ?? false) + await connection.setDebugLogging(!!config.debug) + await connection.setDebugState(!!config.debugState) } catch { this.emit('warning', 'Failed to update debug values for ' + id) }