Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
lazytiger committed Jan 25, 2024
1 parent 3825a79 commit d1862f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions mobile2/backend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use std::sync::{atomic::AtomicBool, Arc, RwLock};
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc, RwLock,
};

use anyhow::Result;
use lazy_static::lazy_static;
Expand Down Expand Up @@ -112,13 +115,13 @@ pub fn on_start(fd: i32) {
let running = looper.running.clone();
std::thread::spawn(move || {
if let Err(err) = std::panic::catch_unwind(|| {
if let Err(err) = crate::tun::start_vpn(fd, running) {
if let Err(err) = crate::platform::start_vpn(fd, running) {
log::error!("vpn service exit with:{:?}", err);
}
}) {
log::error!("vpn service exit with:{:?}", err);
}
if let Err(err) = stop_vpn() {
if let Err(err) = crate::platform::stop_vpn() {
log::error!("stop vpn failed:{:?}", err);
}
});
Expand Down
2 changes: 1 addition & 1 deletion mobile2/backend/src/platform/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wry::webview::{WebViewBuilder, WebViewBuilderExtAndroid};

use wry::android_binding;

use crate::main;
use crate::{main, set_error, types::Error};
use jni::{
objects::{JObject, JString},
sys::{jboolean, jint, jobject},
Expand Down

0 comments on commit d1862f6

Please sign in to comment.