mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 20:57:26 +08:00
fix android (#531)
This commit is contained in:
@@ -828,7 +828,7 @@ async fn run_main(cli: Cli) -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() {
|
||||
let locale = sys_locale::get_locale().unwrap_or_else(|| String::from("en-US"));
|
||||
rust_i18n::set_locale(&locale);
|
||||
|
||||
@@ -139,12 +139,17 @@ pub fn setup_panic_handler() {
|
||||
|
||||
if let Some(payload_str) = payload_str {
|
||||
println!(
|
||||
"panic occurred: payload:{}, location: {:?}",
|
||||
"panic occurred: payload:{}, location: {:?}, backtrace: {:#?}",
|
||||
payload_str,
|
||||
info.location()
|
||||
info.location(),
|
||||
backtrace
|
||||
);
|
||||
} else {
|
||||
println!("panic occurred: location: {:?}", info.location());
|
||||
println!(
|
||||
"panic occurred: location: {:?}, backtrace: {:#?}",
|
||||
info.location(),
|
||||
backtrace
|
||||
);
|
||||
}
|
||||
println!("{}", rust_i18n::t!("core_app.panic_backtrace_save"));
|
||||
let _ = std::fs::File::create("easytier-panic.log")
|
||||
|
||||
Reference in New Issue
Block a user