1
0
forked from bot/app

: zap: 添加api请求超时限制

This commit is contained in:
2024-04-26 12:39:43 +08:00
parent bb9b8a1ced
commit 857e58d635
3 changed files with 5 additions and 3 deletions

View File

@ -30,7 +30,7 @@ def register_bot():
}
try:
nonebot.logger.info("Waiting for register to Liteyuki...")
resp = requests.post(url, json=data)
resp = requests.post(url, json=data, timeout=(10, 15))
if resp.status_code == 200:
data = resp.json()
if liteyuki_id := data.get("liteyuki_id"):