From 8676c5aa4e18086bf56a21966de01f173b6b6983 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 3 Apr 2023 20:11:30 +0000 Subject: [PATCH] Don't immediately exit BP if `ChannelManager` is persistable If `ChannelManager` is persistable before the async background processor even starts, it may not even get around to overwriting the `should_exit` flag before testing it, and the default value is (incorrectly) true, causing an immediate unconditional exit. The default value should simply be false. Fixes #2140 --- lightning-background-processor/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index c30e5ad66..3dd099b49 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -518,7 +518,7 @@ where UMH::Target: 'static + CustomMessageHandler, PS::Target: 'static + Persister<'a, CW, T, ES, NS, SP, F, R, L, SC>, { - let mut should_break = true; + let mut should_break = false; let async_event_handler = |event| { let network_graph = gossip_sync.network_graph(); let event_handler = &event_handler; -- 2.39.5