mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: more graceful shutdown.
Be more graceful in shutting down: this should fix the issue where bookkeeper gets upset that its commands are rejected during shutdown, and generally make things more graceful. 1. Stop any new RPC connections. 2. Stop any per-peer daemons (channeld, etc). 3. Shut down plugins. 4. Stop all existing RPC connections. 5. Stop global daemons. 6. Free up peer, chanen HTLC datastructures. 7. Close database. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: Plugins: RPC operations are now still available during shutdown.
This commit is contained in:
committed by
Christian Decker
parent
e853cdc3ff
commit
375215a141
@@ -167,7 +167,8 @@ static void plugin_hook_callback(const char *buffer, const jsmntok_t *toks,
|
||||
tal_del_destructor(last, plugin_hook_killed);
|
||||
tal_free(last);
|
||||
|
||||
if (r->ld->state == LD_STATE_SHUTDOWN) {
|
||||
/* Actually, if it dies during shutdown, *don't* process result! */
|
||||
if (!buffer && r->ld->state == LD_STATE_SHUTDOWN) {
|
||||
log_debug(r->ld->log,
|
||||
"Abandoning plugin hook call due to shutdown");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user