mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 16:30:32 +08:00
fix: log IPC path issues conditionally based on tun mode setting
This commit is contained in:
parent
7da5a804f9
commit
6511f3868e
@ -381,7 +381,12 @@ pub(super) async fn stop_core_by_service() -> Result<()> {
|
|||||||
/// 检查服务是否正在运行
|
/// 检查服务是否正在运行
|
||||||
pub async fn is_service_available() -> Result<()> {
|
pub async fn is_service_available() -> Result<()> {
|
||||||
if let Err(e) = Path::metadata(clash_verge_service_ipc::IPC_PATH.as_ref()) {
|
if let Err(e) = Path::metadata(clash_verge_service_ipc::IPC_PATH.as_ref()) {
|
||||||
logging!(warn, Type::Service, "Some issue with service IPC Path: {}", e);
|
let verge = Config::verge().await;
|
||||||
|
let verge_last = verge.latest_arc();
|
||||||
|
let is_enable = verge_last.enable_tun_mode.unwrap_or(false);
|
||||||
|
if is_enable {
|
||||||
|
logging!(warn, Type::Service, "Some issue with service IPC Path: {}", e);
|
||||||
|
}
|
||||||
return Err(e.into());
|
return Err(e.into());
|
||||||
}
|
}
|
||||||
clash_verge_service_ipc::connect().await?;
|
clash_verge_service_ipc::connect().await?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user