-
Notifications
You must be signed in to change notification settings - Fork 975
Closed
Labels
rustIssue related to rustIssue related to rust
Description
As far as I can tell, plugin authors need to handle 2 separate triggers to shut down our plugins:
- We receive shutdown notification from
lightnignd. lightningdstopped and we didn't receiveshutdownnotification. This can be if we read from STDIN and receive 0 bytes.
Having to handle 2 different shutdown triggers complicate plugin code. Ideally plugin authors could pass a single callback to cln_plugin's plugin builder which would get run in either case. It also took me a long time to understand that I should be handling these 2 cases. Perhaps one explicit shutdown handler would make this clearer. If, for some reason, a plugin wanted to handle these differently, then an enum could be passed as an argument to this callback indicating which case needs handling.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
rustIssue related to rustIssue related to rust