mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 23:06:44 +01:00
lightningd: increase startup time for plugins to 120 seconds.
Raspberry Pi, with bitcoind running and full gossip topology may actually hit this, and we have a report in practice. Note that the comment is wrong, so fix that too. Fixes: https://github.com/ElementsProject/lightning/issues/7724 Reported-by: m-schmoock Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7a1b126d49
commit
ee3133f198
1 changed files with 4 additions and 8 deletions
|
@ -33,13 +33,9 @@
|
|||
/* Only this file can include this generated header! */
|
||||
# include <plugins/list_of_builtin_plugins_gen.h>
|
||||
|
||||
/* How many seconds may the plugin take to reply to the `getmanifest`
|
||||
* call? This is the maximum delay to `lightningd --help` and until
|
||||
* we can start the main `io_loop` to communicate with peers. If this
|
||||
* hangs we can't do much, so we put an upper bound on the time we're
|
||||
* willing to wait. Plugins shouldn't do any initialization in the
|
||||
* `getmanifest` call anyway, that's what `init` is for. */
|
||||
#define PLUGIN_MANIFEST_TIMEOUT 60
|
||||
/* How many seconds may the plugin take frome the `getmanifest`
|
||||
* call to replying to the init call? */
|
||||
#define PLUGIN_STARTUP_TIMEOUT 120
|
||||
|
||||
static void memleak_help_pending_requests(struct htable *memtable,
|
||||
struct plugin *plugin)
|
||||
|
@ -2012,7 +2008,7 @@ static void plugin_set_timeout(struct plugin *p)
|
|||
else {
|
||||
p->timeout_timer
|
||||
= new_reltimer(p->plugins->ld->timers, p,
|
||||
time_from_sec(PLUGIN_MANIFEST_TIMEOUT),
|
||||
time_from_sec(PLUGIN_STARTUP_TIMEOUT),
|
||||
plugin_manifest_timeout, p);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue