From 3f201171e4267556d5af3c1b5c9132e9d3f089d2 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 3 Nov 2024 16:33:44 +0800 Subject: [PATCH] :bug: Fix sign always raise TimeoutException --- plugins/tools/sign.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/tools/sign.py b/plugins/tools/sign.py index 5031849..1b12de6 100644 --- a/plugins/tools/sign.py +++ b/plugins/tools/sign.py @@ -177,6 +177,11 @@ class SignSystem(Plugin): try: await self.sign_with_recognize(client) break + except TimeoutException as e: + if ret == retry - 1: + raise e + await asyncio.sleep(random.randint(0, 3)) # nosec + continue except NeedChallenge as e: if ret == retry - 1: # 重试次数用完,抛出异常