Skip to content

Commit

Permalink
removing redundant error capture for TLS certificate watcher close me…
Browse files Browse the repository at this point in the history
…thod

Signed-off-by: rjs211 <srivatsa211@gmail.com>
  • Loading branch information
rjs211 committed Feb 8, 2021
1 parent 473c063 commit cd29744
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cmd/collector/app/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,9 @@ func (c *Collector) Close() error {
c.logger.Error("failed to close span processor.", zap.Error(err))
}

if err := c.tlsGRPCCertWatcherCloser.Close(); err != nil {
c.logger.Error("failed to close gRPC TLS certificate watcher", zap.Error(err))
}

if err := c.tlsHTTPCertWatcherCloser.Close(); err != nil {
c.logger.Error("failed to close HTTP TLS certificate watcher", zap.Error(err))
}
// watchers actually never return errors from Close
_ = c.tlsGRPCCertWatcherCloser.Close()
_ = c.tlsHTTPCertWatcherCloser.Close()

return nil
}
Expand Down

0 comments on commit cd29744

Please sign in to comment.