diff --git a/RELEASE_NOTES_v1.1.1.md b/RELEASE_NOTES_v1.1.1.md index 20aafcd..e07e2c2 100644 --- a/RELEASE_NOTES_v1.1.1.md +++ b/RELEASE_NOTES_v1.1.1.md @@ -14,5 +14,5 @@ | File | SHA-256 | |---|---| -| `SilentDragonXLite` (Linux) | `17b34e63bce97dcb53eb930b6766aca88c7388303cc34db57d11db96afae5f48` | -| `SilentDragonXLite.exe` (Windows) | `ce2df9860927a07459ef50231e4c133a07a96891b668e90187849492f96ec125` | +| `SilentDragonXLite` (Linux) | `bc5e0020d784a905e2d461ccb5b4c5da4436072245370ec9e09a17e9e7ad0307` | +| `SilentDragonXLite.exe` (Windows) | `47f45ff44521eb46ee87189ee2318d0ca61f44b39c2a9d875e1a3d7329700df8` | diff --git a/SilentDragonXLite b/SilentDragonXLite index 80f4b1a..a39f773 100755 Binary files a/SilentDragonXLite and b/SilentDragonXLite differ diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 6c02643..1b1fcbd 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -140,6 +140,17 @@ pub extern "C" fn litelib_initialize_new_from_phrase(dangerous: bool, server: *c //println!("Initializing with server: {}, seed: {}", server_str, seed_str); + // Shut down the existing client if one is running, to stop background threads + if overwrite { + let old_lc = match LIGHTCLIENT.lock() { + Ok(l) => l.borrow().clone(), + Err(poisoned) => poisoned.into_inner().borrow().clone(), + }; + if let Some(lc) = old_lc { + lc.shutdown(); + } + } + let server = LightClientConfig::get_server_or_default(Some(server_str)); let (config, _latest_block_height) = match LightClientConfig::create(server, dangerous) { Ok((c, h)) => {