From 36baef22e284355749f7e35deeb2e847859b8046 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 3 Sep 2021 19:46:23 +0930 Subject: [PATCH] doc: document shutdown plugin. Signed-off-by: Rusty Russell --- doc/PLUGINS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index a38e4e789..fc194f5ff 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -791,6 +791,16 @@ 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. + +Because lightningd can crash or be killed, a plugin cannot rely on +this function always called. + + ## Hooks Hooks allow a plugin to define custom behavior for `lightningd`