mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 03:55:26 +00:00
🐛 Fix sign always raise TimeoutException
This commit is contained in:
parent
ccd7da0ee0
commit
3f201171e4
@ -177,6 +177,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:
|
||||||
# 重试次数用完,抛出异常
|
# 重试次数用完,抛出异常
|
||||||
|
Loading…
Reference in New Issue
Block a user