Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure Stop hooks are executed when Start times out on a long-runn…
…ing Start hook (#1061) Currently, none of Stop hooks are run if app.Start fails with a timeout, and app's lifecycle is stuck on waiting for a long-running Start hook to finish executing. While we cannot run Stop hook for the long-running Start hook that caused the timeout, we can still run rest of the Stop hooks for the Start hooks that finished running. In this PR, this is done by just easing up the requirement for running Stop hooks to include lifecycle's `starting` state. Ideally the app's lifecycle state should transition into `incompleteStart` when a long-running Start hook causes the context to timeout and does not respect the context expiration. However, this requires a bigger refactor so that all lifecycle hook invocations are made asynchronous. Fixes #1035 Co-authored-by: Sung Yoon Whang <sungyoon@uber.com>
- Loading branch information