Skip to content

Commit

Permalink
fix: improve implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Sep 12, 2024
1 parent ca79c73 commit 7f35c53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ import { ConfigManager, DeviceConfig } from '@zwave-js/config'
import { readFile } from 'fs/promises'
import backupManager, { NVM_BACKUP_PREFIX } from './BackupManager'
import { socketEvents } from './SocketEvents'
import { PassThrough } from 'stream'

Check failure on line 127 in api/lib/ZwaveClient.ts

View workflow job for this annotation

GitHub Actions / test (18.x)

'PassThrough' is defined but never used

export const deviceConfigPriorityDir = storeDir + '/config'

Expand Down Expand Up @@ -2266,7 +2267,9 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {

zwaveOptions.logConfig.transports = [logTransport]

logTransport.stream.pipe(LogManager.logStream)
logTransport.stream.on('data', (data) => {
LogManager.logStream.push(Buffer.from(data.message))
})

try {
// init driver here because if connect fails the driver is destroyed
Expand Down

0 comments on commit 7f35c53

Please sign in to comment.