Skip to content

Commit b0e27b6

Browse files
authored
Merge pull request #76 from utxostack/ref/stop-uninit
Call uninit in stop function to avoid AlreadyRunning error
2 parents e987fcf + 8db5803 commit b0e27b6

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: mutiny-wasm/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cargo-features = ["per-package-target"]
22

33
[package]
44
name = "mutiny-wasm"
5-
version = "1.10.24"
5+
version = "1.10.25"
66
edition = "2021"
77
authors = ["utxostack"]
88
forced-target = "wasm32-unknown-unknown"

Diff for: mutiny-wasm/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,11 @@ impl MutinyWallet {
500500
#[wasm_bindgen]
501501
pub async fn stop(&mut self) -> Result<(), MutinyJsError> {
502502
// Ok(self.inner.node_manager.stop().await?)
503+
504+
// uninit
505+
let mut init = INITIALIZED.lock().await;
506+
*init = false;
507+
503508
Ok(self.inner.stop().await?)
504509
}
505510

0 commit comments

Comments
 (0)