Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: shutdown the actual http server (#1689)
PR #1680 introduced graceful handling for the HTTP server in Thanos, but the graceful `Shutdown` call was being performed on an `http.Server` instance that was *not* running at all. The actual server that was listening for requests was started through `http.Serve`, so there was no reference to the server struct that we could use to shut it down. This was causing all of Thanos to freeze after receiving an exit signal, because the run-group for the HTTP server would never finalize. This seems like an oversight because the `(*Server).srv` field was being properly initialized with an HTTP server. Fix this by calling `ListenAndServe` on our initialized server. Signed-off-by: Vicent Marti <[email protected]> Signed-off-by: Giedrius Statkevičius <[email protected]>
- Loading branch information