🐛 Fix sign always raise TimeoutException

This commit is contained in:
xtaodada 2024-11-03 16:33:44 +08:00
parent 0566adeac3
commit 435b1dc462
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -173,6 +173,11 @@ class SignSystem(Plugin):
try: try:
await self.sign_with_recognize(client) await self.sign_with_recognize(client)
break break
except TimeoutException as e:
if ret == retry - 1:
raise e
await asyncio.sleep(random.randint(0, 3)) # nosec
continue
except NeedChallenge as e: except NeedChallenge as e:
if ret == retry - 1: if ret == retry - 1:
# 重试次数用完,抛出异常 # 重试次数用完,抛出异常