Fix waitForAll context for graceful exits
This commit is contained in:
@@ -275,8 +275,9 @@ func main() {
|
|||||||
logger.Error(err)
|
logger.Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
errors := waiter.WaitForAll(ctx)
|
timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||||
for _, err := range errors {
|
defer cancel()
|
||||||
|
for _, err := range waiter.WaitForAll(timeoutCtx) {
|
||||||
logger.Error(err)
|
logger.Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user