mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-19 13:19:39 +00:00
build: update tor arti 0.29.0
This commit is contained in:
@@ -18,7 +18,7 @@ use egui::{Id, RichText};
|
||||
use grin_core::core::{amount_from_hr_string, amount_to_hr_string};
|
||||
use grin_wallet_libwallet::{Error, SlatepackAddress};
|
||||
use parking_lot::RwLock;
|
||||
use tor_rtcompat::BlockOn;
|
||||
use tor_rtcompat::ToplevelBlockOn;
|
||||
use tor_rtcompat::tokio::TokioNativeTlsRuntime;
|
||||
use crate::gui::Colors;
|
||||
use crate::gui::platform::PlatformCallbacks;
|
||||
|
||||
+4
-2
@@ -14,6 +14,8 @@
|
||||
|
||||
#![windows_subsystem = "windows"]
|
||||
|
||||
use tor_rtcompat::ToplevelBlockOn;
|
||||
|
||||
pub fn main() {
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
@@ -173,7 +175,7 @@ fn start_desktop_gui(platform: grim::gui::platform::Desktop) {
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn is_app_running(data: &Option<String>) -> bool {
|
||||
use tor_rtcompat::BlockOn;
|
||||
use tor_rtcompat::ToplevelBlockOn;
|
||||
let runtime = tor_rtcompat::tokio::TokioNativeTlsRuntime::create().unwrap();
|
||||
let res: Result<(), Box<dyn std::error::Error>> = runtime
|
||||
.block_on(async {
|
||||
@@ -212,7 +214,7 @@ fn is_app_running(data: &Option<String>) -> bool {
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn start_app_socket(platform: grim::gui::platform::Desktop) {
|
||||
std::thread::spawn(move || {
|
||||
use tor_rtcompat::BlockOn;
|
||||
use tor_rtcompat::ToplevelBlockOn;
|
||||
let runtime = tor_rtcompat::tokio::TokioNativeTlsRuntime::create().unwrap();
|
||||
let _: Result<_, _> = runtime
|
||||
.block_on(async {
|
||||
|
||||
+3
-2
@@ -263,7 +263,8 @@ impl Tor {
|
||||
return;
|
||||
}
|
||||
let client_check = client_thread.clone();
|
||||
let url = format!("http://{}/", service.onion_name().unwrap().to_string());
|
||||
let addr = service.onion_address().unwrap().to_string();
|
||||
let url = format!("http://{}/", addr);
|
||||
thread::spawn(move || {
|
||||
// Wait 1 second to start.
|
||||
thread::sleep(Duration::from_millis(1000));
|
||||
@@ -305,7 +306,7 @@ impl Tor {
|
||||
// Remove service from failed.
|
||||
let mut w_services =
|
||||
TOR_SERVER_STATE.failed_services.write();
|
||||
w_services.remove(id);
|
||||
w_services.remove(&service_id);
|
||||
// Check again after 50 seconds.
|
||||
Duration::from_millis(50000)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user