lightningd: generically fail requests when plugin dies.
We had special code to fail a forwarded request, but not for an internally-generated request. Instead, we should pretend the (dead) plugin responded with a PLUGIN_TERMINATED error, and handle the request through the normal paths. This breaks the case where a plugin crashes (or stops itself) in a hook, so we handle that next. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -76,10 +76,6 @@ struct plugin {
|
||||
/* Currently pending requests by their request ID */
|
||||
STRMAP(struct jsonrpc_request *) pending_requests;
|
||||
|
||||
/* An array of currently pending RPC method calls, to be killed if the
|
||||
* plugin exits. */
|
||||
struct list_head pending_rpccalls;
|
||||
|
||||
/* If set, the plugin is so important that if it terminates early,
|
||||
* C-lightning should terminate as well. */
|
||||
bool important;
|
||||
|
||||
Reference in New Issue
Block a user