Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@ export class ConnectionManager extends EventEmitter<ConnectionManagerEvents> {
// 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 })
}
Expand Down Expand Up @@ -304,8 +301,8 @@ export class ConnectionManager extends EventEmitter<ConnectionManagerEvents> {
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)
}
Expand Down
Loading