Skip to content

Commit

Permalink
avoid startup error message
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor-toth committed Dec 11, 2024
1 parent d238a92 commit 08d8b0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/streams/n2kAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function N2KAnalyzer(options) {
this.linereader.on('line', function (data) {
try {
let parsed = JSON.parse(data)
if ( parsed.version ) {
console.log('Connected to analyzer v'+parsed.version);
return;
}
that.push(parsed)
options.app.emit(that.analyzerOutEvent, parsed)
} catch (ex) {
Expand Down

0 comments on commit 08d8b0f

Please sign in to comment.