fix: crash in single drive mode for lifecycle (#12077)

also make sure to close the channel on the producer
side, not in a separate go-routine, this can lead
to races between a writer and a closer.

fixes #12073
This commit is contained in:
Harshavardhana
2021-04-16 14:09:25 -07:00
committed by GitHub
parent ca9b48b3b4
commit 0a9d8dfb0b
3 changed files with 23 additions and 18 deletions

View File

@@ -516,9 +516,9 @@ func serverMain(ctx *cli.Context) {
if globalIsErasure {
initAutoHeal(GlobalContext, newObject)
initBackgroundTransition(GlobalContext, newObject)
initBackgroundExpiry(GlobalContext, newObject)
}
initBackgroundExpiry(GlobalContext, newObject)
initDataScanner(GlobalContext, newObject)
if err = initServer(GlobalContext, newObject); err != nil {