perf: optimize network requests and update logic to support aborting

This commit is contained in:
wonfen
2025-05-04 11:25:48 +08:00
parent 779291151e
commit 23b0493d0b
4 changed files with 14 additions and 12 deletions

View File

@@ -107,9 +107,8 @@ pub async fn test_delay(url: String) -> anyhow::Result<u32> {
let start = Instant::now();
// 使用网络管理器发送请求设置10秒超时
let response = NetworkManager::global()
.get(&url, proxy_type, Some(10), user_agent, false)
.get_with_interrupt(&url, proxy_type, Some(10), user_agent, false)
.await;
match response {