Skip to content

Commit

Permalink
Fix excessive closing connection error logging
Browse files Browse the repository at this point in the history
`http_service` pollers had an inverted check on whether to log about
closing the network connection which led to excessive error log noise.
  • Loading branch information
wrouesnel committed Aug 11, 2022
1 parent 4593eaf commit c393e0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pollers/http_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (hs *HTTPService) Poll() {
defer func() {
if err := conn.Close(); err != nil {
// This happens normally, ignore it.
if errors.Is(err, net.ErrClosed) {
if !errors.Is(err, net.ErrClosed) {
l.Info("Error closing connection", zap.String("error", err.Error()))
}
}
Expand Down

0 comments on commit c393e0a

Please sign in to comment.