Skip to content

Commit

Permalink
Remove duplicate closing grpc listener (#1322)
Browse files Browse the repository at this point in the history
Signed-off-by: jojohappy <[email protected]>
  • Loading branch information
jojohappy authored and Giedrius Statkevičius committed Jul 12, 2019
1 parent 8469ab6 commit 7b36de5
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
}

Expand Down
3 changes: 0 additions & 3 deletions cmd/thanos/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@ func runReceive(
if s != nil {
s.Stop()
}
if l != nil {
runutil.CloseWithLogOnErr(logger, l, "store gRPC listener")
}
})
}

Expand Down
1 change: 0 additions & 1 deletion cmd/thanos/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion cmd/thanos/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7b36de5

Please sign in to comment.