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 authored and tkurki committed Dec 15, 2024
1 parent 4d438aa commit f9c778d
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 f9c778d

Please sign in to comment.