Skip to content

Commit

Permalink
Merge pull request #76 from utxostack/ref/stop-uninit
Browse files Browse the repository at this point in the history
Call uninit in stop function to avoid AlreadyRunning error
  • Loading branch information
duanyytop authored Dec 26, 2024
2 parents e987fcf + 8db5803 commit b0e27b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mutiny-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cargo-features = ["per-package-target"]

[package]
name = "mutiny-wasm"
version = "1.10.24"
version = "1.10.25"
edition = "2021"
authors = ["utxostack"]
forced-target = "wasm32-unknown-unknown"
Expand Down
5 changes: 5 additions & 0 deletions mutiny-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ impl MutinyWallet {
#[wasm_bindgen]
pub async fn stop(&mut self) -> Result<(), MutinyJsError> {
// Ok(self.inner.node_manager.stop().await?)

// uninit
let mut init = INITIALIZED.lock().await;
*init = false;

Ok(self.inner.stop().await?)
}

Expand Down

0 comments on commit b0e27b6

Please sign in to comment.