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:
Simon Vrouwe
2021-11-24 15:16:43 +02:00
committed by Rusty Russell
parent 4dded23cd3
commit a2a480e636

View File

@@ -793,12 +793,14 @@ here, with the peer's signatures attached.
### `shutdown` ### `shutdown`
Called when lightningd is shutting down, or this plugin has been Send in two situations: lightningd is (almost completely) shutdown, or the plugin
shutdown by the plugin stop command. The plugin has 30 seconds to `stop` command has been called for this plugin. In both cases the plugin has 30
exit itself, otherwise it's killed. seconds to exit itself, otherwise it's killed.
Because lightningd can crash or be killed, a plugin cannot rely on In the shutdown case, plugins should not interact with lightnind except via (id-less)
this function always called. 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 ## Hooks