From 93f47f542183fb44679ca029a822a87102591bbe Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 25 Mar 2018 15:48:41 -0400 Subject: [PATCH] Fix double-locking in channelmanager --- src/ln/channelmanager.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index d7bd9ff9d..ff6f924c6 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -772,6 +772,7 @@ impl ChannelManager { if from_user { panic!("Called claim_funds with a preimage for an outgoing payment. There is nothing we can do with this, and something is seriously wrong if you knew this..."); } + mem::drop(channel_state); let mut pending_events = self.pending_events.lock().unwrap(); pending_events.push(events::Event::PaymentSent { payment_preimage @@ -795,6 +796,7 @@ impl ChannelManager { } }; + mem::drop(channel_state); let mut pending_events = self.pending_events.lock().unwrap(); pending_events.push(events::Event::SendFulfillHTLC { node_id: node_id, -- 2.39.5