fix: disconnect VPN when sleep

This commit is contained in:
Kevin Yue committed 2025-01-20 19:29:22 +08:00
1 parent ec85e857bc
commit b188d61be1
22 files changed
+526 -238

No files matched your search

+4 -5
View File
@@ -1,10 +1,9 @@
use tokio::fs;
use crate::GP_SERVICE_LOCK_FILE;
use super::lock_file::gpservice_lock_info;
async fn read_port() -> anyhow::Result<String> {
let port = fs::read_to_string(GP_SERVICE_LOCK_FILE).await?;
Ok(port.trim().to_string())
let lock_info = gpservice_lock_info().await?;
Ok(lock_info.port.to_string())
}
pub async fn http_endpoint() -> anyhow::Result<String> {