Skip to content

Commit aa0b957

Browse files
committed
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
1 parent d9668c8 commit aa0b957

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/raw_client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ impl<T: Read + Write> ElectrumApi for RawClient<T> {
819819
}
820820

821821
script_notifications.insert(script_hash, VecDeque::new());
822+
drop(script_notifications);
822823

823824
let req = Request::new_id(
824825
self.last_id.fetch_add(1, Ordering::SeqCst),

0 commit comments

Comments
 (0)