Skip to content

Commit

Permalink
sdsv3: Don't log error when connection closes
Browse files Browse the repository at this point in the history
If we receive a nil error on the errch it means that the connection
has been closed cleanly. We shouldn't log an error in that case.

Signed-off-by: Sorin Dumitru <sdumitru@bloomberg.net>
  • Loading branch information
sorindumitru committed Feb 3, 2025
1 parent ba81582 commit 936942f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/agent/endpoints/sdsv3/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ func (h *Handler) StreamSecrets(stream secret_v3.SecretDiscoveryService_StreamSe
continue
}
case err := <-errch:
log.WithError(err).Error("Received error from stream secrets server")
if err != nil {
log.WithError(err).Error("Received error from stream secrets server")
}
return err
}

Expand Down

0 comments on commit 936942f

Please sign in to comment.