diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 612d47e10b..d3030b78fa 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -451,7 +451,6 @@ func runQuery( return errors.Wrap(s.Serve(l), "serve gRPC") }, func(error) { s.Stop() - runutil.CloseWithLogOnErr(logger, l, "store gRPC listener") }) } diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 152fe1732a..04527ec1c4 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -280,9 +280,6 @@ func runReceive( if s != nil { s.Stop() } - if l != nil { - runutil.CloseWithLogOnErr(logger, l, "store gRPC listener") - } }) } diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go index 8c8f10fc49..ac0de36bf8 100644 --- a/cmd/thanos/rule.go +++ b/cmd/thanos/rule.go @@ -504,7 +504,6 @@ func runRule( return errors.Wrap(s.Serve(l), "serve gRPC") }, func(error) { s.Stop() - runutil.CloseWithLogOnErr(logger, l, "store gRPC listener") }) } // Start UI & metrics HTTP server. diff --git a/cmd/thanos/sidecar.go b/cmd/thanos/sidecar.go index 33ff816bbd..a91b13231b 100644 --- a/cmd/thanos/sidecar.go +++ b/cmd/thanos/sidecar.go @@ -223,7 +223,6 @@ func runSidecar( return errors.Wrap(s.Serve(l), "serve gRPC") }, func(error) { s.Stop() - runutil.CloseWithLogOnErr(logger, l, "store gRPC listener") }) } diff --git a/cmd/thanos/store.go b/cmd/thanos/store.go index 8a7cfcf144..59e57957f6 100644 --- a/cmd/thanos/store.go +++ b/cmd/thanos/store.go @@ -181,7 +181,7 @@ func runStore( level.Info(logger).Log("msg", "Listening for StoreAPI gRPC", "address", grpcBindAddr) return errors.Wrap(s.Serve(l), "serve gRPC") }, func(error) { - runutil.CloseWithLogOnErr(logger, l, "store gRPC listener") + s.Stop() }) } if err := metricHTTPListenGroup(g, logger, reg, httpBindAddr); err != nil {