Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

core: Check if context is canceled while waiting for app.started #573

Open
albrow opened this issue Dec 3, 2019 · 0 comments
Open

core: Check if context is canceled while waiting for app.started #573

albrow opened this issue Dec 3, 2019 · 0 comments

Comments

@albrow
Copy link
Contributor

albrow commented Dec 3, 2019

The fix implemented in #560 could break graceful shutdowns. We need to account for the fact that the context could be canceled before the app is actually started. So something like this:

select {
    case <-app.ctx.Done():
        return nil, context.Canceled
    case <-app.started:
        // continue as normal...
}

See also #161

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant