Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent shutdown when plugin_startup() fails. #27

Merged
merged 2 commits into from
May 30, 2023

Conversation

greg7mdp
Copy link
Contributor

We recommend that, in case of a fatal error during plugin_startup() (fatal in the sense that the application should close), the plugin throw an exception.

However, some plugins call app().quit() instead. This commit ensures that calling app().quit() during plugin_startup() has the same effect as throwing an exception, in that:

  1. plugin_startup() will not be called on any other plugin
  2. plugin_shutdown() will be called for this plugin and all other plugins previously started.
  3. the application will terminate cleanly.

@greg7mdp greg7mdp requested review from heifner and vladtr May 26, 2023 20:10
@greg7mdp greg7mdp merged commit fa081b4 into main May 30, 2023
@greg7mdp greg7mdp deleted the consistent_shutdown_when_quit branch May 30, 2023 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants