feat: add network manager to optimize network request handling

This commit is contained in:
wonfen
2025-04-30 21:30:28 +08:00
parent 3ce5d3bf2d
commit 32b6821b8a
10 changed files with 340 additions and 96 deletions

View File

@@ -86,6 +86,9 @@ impl AppHandleManager {
#[allow(clippy::panic)]
pub fn run() {
// 初始化网络管理器
utils::network::NetworkManager::global().init();
// 单例检测 - 使用超时机制防止阻塞
let app_exists: bool = AsyncHandler::block_on(move || async move {
match timeout(Duration::from_secs(3), server::check_singleton()).await {