mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
修复正确请求到api后没有正确关闭浏览器标签页导致内存溢出的bug
This commit is contained in:
@@ -125,6 +125,7 @@ async def request(url: str) -> tuple[bool, bool, dict[str, Any]]:
|
||||
except JSONDecodeError:
|
||||
await page.wait_for_timeout(1000)
|
||||
else:
|
||||
await page.close()
|
||||
return (True, data['success'], data)
|
||||
if attempts >= 60:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user