From aa0b9578188dcae8219316ef392329d764b04b2e Mon Sep 17 00:00:00 2001 From: Sebastian Kung Date: Tue, 16 Aug 2022 22:21:43 +0200 Subject: [PATCH] Client: Drop script subscriptions to free lock This fixes a supposed deadlock when the reader thread receives a script subscription notification from the server before it receives a subscribing response --- src/raw_client.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/raw_client.rs b/src/raw_client.rs index b2f65fd..cd7f0ee 100644 --- a/src/raw_client.rs +++ b/src/raw_client.rs @@ -819,6 +819,7 @@ impl ElectrumApi for RawClient { } script_notifications.insert(script_hash, VecDeque::new()); + drop(script_notifications); let req = Request::new_id( self.last_id.fetch_add(1, Ordering::SeqCst),