lightningd: wait for all plugins to gracefully shutdown#9000
Open
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
Open
lightningd: wait for all plugins to gracefully shutdown#9000ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
Conversation
When multiple plugins are shutting down and one exits before others, io_loop() can return early (e.g. when num_fds drops to 0), causing remaining plugins to be killed immediately instead of being given their full 30-second grace period. Fix by wrapping io_loop() in a while loop that continues as long as plugins are still alive, only breaking when the timer expires. Fixes ElementsProject#7697 Changelog-Fixed: Plugins: now wait for all plugins to gracefully shutdown instead of killing remaining plugins when one exits first. ([ElementsProject#7697])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7697\n\nChangelog-Changed: lightningd now waits for all running plugins to gracefully shutdown before exiting.\n\nWhen multiple plugins are shutting down and one exits before others,\nio_loop() can return early (e.g. when num_fds drops to 0), causing\nremaining plugins to be killed immediately instead of being given their\nfull 30-second grace period.\n\nFix by wrapping io_loop() in a while loop that continues as long as\nplugins are still alive, only breaking when the timer expires.\n\nThe fix is minimal (7 lines changed) and follows the existing code\npattern. No new state tracking needed — the plugin list already\ncorrectly tracks which plugins are alive.