mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-04 03:03:51 +01:00
doc: update shutdown notification, changelog
Fixes: #4785 Fixes: #4883 Changelog-Changed: Plugins: `shutdown` notification is now send when lightningd is almost completely shutdown, RPC calls then fail with error code -5.
This commit is contained in:
parent
4dded23cd3
commit
a2a480e636
1 changed files with 7 additions and 5 deletions
|
@ -793,12 +793,14 @@ here, with the peer's signatures attached.
|
|||
|
||||
### `shutdown`
|
||||
|
||||
Called when lightningd is shutting down, or this plugin has been
|
||||
shutdown by the plugin stop command. The plugin has 30 seconds to
|
||||
exit itself, otherwise it's killed.
|
||||
Send in two situations: lightningd is (almost completely) shutdown, or the plugin
|
||||
`stop` command has been called for this plugin. In both cases the plugin has 30
|
||||
seconds to exit itself, otherwise it's killed.
|
||||
|
||||
Because lightningd can crash or be killed, a plugin cannot rely on
|
||||
this function always called.
|
||||
In the shutdown case, plugins should not interact with lightnind except via (id-less)
|
||||
logging or notifications. New rpc calls will fail with error code -5 and (plugin's)
|
||||
responses will be ignored. Because lightningd can crash or be killed, a plugin cannot
|
||||
rely on the shutdown notification always been send.
|
||||
|
||||
|
||||
## Hooks
|
||||
|
|
Loading…
Add table
Reference in a new issue