Fix waitForAll context for graceful exits

This commit is contained in:
Quentin McGaw
2020-05-07 12:58:37 +00:00
parent 0dc400b540
commit da739a0c3d

View File

@@ -275,8 +275,9 @@ func main() {
logger.Error(err)
}
}
errors := waiter.WaitForAll(ctx)
for _, err := range errors {
timeoutCtx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
for _, err := range waiter.WaitForAll(timeoutCtx) {
logger.Error(err)
}
}