Skip to content

Commit

Permalink
loki: shutdown module before shutting down HTTP server
Browse files Browse the repository at this point in the history
Shutting the module down before shutting down the HTTP server enables
metrics to continue to be collected while the module terminates.

This change syncs up with how Cortex modules are shut down; the module
is always terminated before the HTTP server.

Fixes grafana#819.
  • Loading branch information
rfratto committed Aug 14, 2019
1 parent e5d6f3c commit 79a9a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ func (t *Loki) Run() error {
// Stop gracefully stops a Loki.
func (t *Loki) Stop() error {
t.stopping(t.cfg.Target)
t.server.Shutdown()
t.stop(t.cfg.Target)
t.server.Shutdown()
return nil
}

Expand Down

0 comments on commit 79a9a72

Please sign in to comment.