Skip to content

Commit fe16b2b

Browse files
authored
Merge pull request #1463 from cortexproject/stop-server-later
Leave Server module running until end of shutdown
2 parents 47c631a + 473b333 commit fe16b2b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pkg/cortex/cortex.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,13 @@ func (t *Cortex) Run() error {
209209

210210
// Stop gracefully stops a Cortex.
211211
func (t *Cortex) Stop() error {
212-
t.server.Shutdown()
213-
t.stop(t.target)
214-
return nil
215-
}
216-
217-
func (t *Cortex) stop(m moduleName) {
218-
t.stopModule(m)
219-
deps := orderedDeps(m)
212+
t.stopModule(t.target)
213+
deps := orderedDeps(t.target)
220214
// iterate over our deps in reverse order and call stopModule
221215
for i := len(deps) - 1; i >= 0; i-- {
222216
t.stopModule(deps[i])
223217
}
218+
return nil
224219
}
225220

226221
func (t *Cortex) stopModule(m moduleName) {

0 commit comments

Comments
 (0)