From cd29744550972b9c5f370f986047406e0073453c Mon Sep 17 00:00:00 2001 From: rjs211 Date: Tue, 9 Feb 2021 04:03:37 +0530 Subject: [PATCH] removing redundant error capture for TLS certificate watcher close method Signed-off-by: rjs211 --- cmd/collector/app/collector.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cmd/collector/app/collector.go b/cmd/collector/app/collector.go index d90770a7941..f46f86a2f5d 100644 --- a/cmd/collector/app/collector.go +++ b/cmd/collector/app/collector.go @@ -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 }