mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
fix: log IPC path issues conditionally based on tun mode setting
This commit is contained in:
@@ -381,7 +381,12 @@ pub(super) async fn stop_core_by_service() -> Result<()> {
|
||||
/// 检查服务是否正在运行
|
||||
pub async fn is_service_available() -> Result<()> {
|
||||
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());
|
||||
}
|
||||
clash_verge_service_ipc::connect().await?;
|
||||
|
||||
Reference in New Issue
Block a user