mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 11:39:22 +00:00
reset i2p status on gui exit
This commit is contained in:
parent
967c903f67
commit
3b6b764bd2
1 changed files with 9 additions and 0 deletions
|
@ -226,6 +226,15 @@ impl eframe::App for WrapApp {
|
||||||
// sanity check that wallet password is no longer in user environment
|
// sanity check that wallet password is no longer in user environment
|
||||||
std::env::set_var(neveko_core::MONERO_WALLET_PASSWORD, "");
|
std::env::set_var(neveko_core::MONERO_WALLET_PASSWORD, "");
|
||||||
let is_bg = std::env::var(crate::NEVEKO_DEV_BACKGROUND).unwrap_or(String::from("0"));
|
let is_bg = std::env::var(crate::NEVEKO_DEV_BACKGROUND).unwrap_or(String::from("0"));
|
||||||
|
let db = &DATABASE_LOCK;
|
||||||
|
let v = bincode::serialize(&neveko_core::i2p::ProxyStatus::Opening).unwrap_or_default();
|
||||||
|
db::write_chunks(
|
||||||
|
&db.env,
|
||||||
|
&db.handle,
|
||||||
|
neveko_core::I2P_STATUS.as_bytes(),
|
||||||
|
&v,
|
||||||
|
)
|
||||||
|
.unwrap_or_else(|_| log::error!("failed to write i2p status."));
|
||||||
if is_bg != String::from("1") {
|
if is_bg != String::from("1") {
|
||||||
utils::kill_child_processes(false);
|
utils::kill_child_processes(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue