From e6b6a0967c911a78bee412cbaaf6342fb967f7f5 Mon Sep 17 00:00:00 2001 From: Changhua Date: Wed, 2 Aug 2023 00:08:11 +0800 Subject: [PATCH] Add timeout to message forward --- clients/http/wcfhttp/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/http/wcfhttp/core.py b/clients/http/wcfhttp/core.py index ec95b60..d87f9bc 100644 --- a/clients/http/wcfhttp/core.py +++ b/clients/http/wcfhttp/core.py @@ -82,7 +82,7 @@ class Http(FastAPI): data["is_group"] = msg.from_group() try: - rsp = requests.post(url=cb, json=data) + rsp = requests.post(url=cb, json=data, timeout=30) if rsp.status_code != 200: self.LOG.error(f"消息转发失败,HTTP 状态码为: {rsp.status_code}") except Exception as e: