mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: Tun disable failed due to too short timeout
This commit is contained in:
@@ -57,13 +57,8 @@ pub async fn clean_async() -> bool {
|
||||
|
||||
let disable_tun = serde_json::json!({ "tun": { "enable": false } });
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
let tun_timeout = Duration::from_millis(100);
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let tun_timeout = Duration::from_millis(100);
|
||||
|
||||
match timeout(
|
||||
tun_timeout,
|
||||
Duration::from_millis(1000),
|
||||
handle::Handle::mihomo()
|
||||
.await
|
||||
.patch_base_config(&disable_tun),
|
||||
|
||||
Reference in New Issue
Block a user