From 2aea6820986a75af4ba4384721d32e56a3bead45 Mon Sep 17 00:00:00 2001 From: milky0217 Date: Tue, 9 Jun 2026 15:44:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20reqwest=20Client=E6=B7=BB=E5=8A=A010s?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E9=98=B2=E6=AD=A2=E7=99=BB=E5=BD=95=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=8C=82=E8=B5=B7=E9=98=BB=E5=A1=9Eworker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e31afd9..f1e8bd0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -239,7 +239,11 @@ async fn main() -> std::io::Result<()> { } }; - let http_client = Client::new(); + let http_client = Client::builder() + .timeout(std::time::Duration::from_secs(10)) + .connect_timeout(std::time::Duration::from_secs(5)) + .build() + .expect("创建 HTTP 客户端失败"); // 启动时清理:过期订单 + 过期登录码 match db::cleanup_expired_pending_orders(&pool, None).await {