Skip to content

Commit

Permalink
check for unusual end of input
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Rampke committed Aug 30, 2017
1 parent c2eddb6 commit 63556b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,8 @@ func (re *rsyslogExporter) run() {
for re.scanner.Scan() {
re.handleStatLine(re.scanner.Bytes())
}
if err := re.scanner.Err(); err != nil {
log.Printf("error reading input: %v", err)
}
os.Exit(0)
}

0 comments on commit 63556b3

Please sign in to comment.