Skip to content

Commit

Permalink
handle kafka connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wanmail committed Dec 26, 2024
1 parent 9c239e5 commit fd5e60c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/tailer/logstream/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func (ks *kafkaStream) stream(ctx context.Context, wg *sync.WaitGroup, oneShot O
break
}

if IsExitableError(err) {
glog.V(2).Infof("stream(%s): exiting, conn has error %s", ks.sourcename, err)
break
}

if err != nil {
logErrors.Add(ks.sourcename, 1)
glog.V(2).Infof("stream(%s): read error: %v", ks.sourcename, err)
Expand Down

0 comments on commit fd5e60c

Please sign in to comment.