fix: 尝试修复在快速启动然后停止时报出大屏错误的问题

This commit is contained in:
helloplhm-qwq 2024-01-05 18:09:55 +08:00
parent aeb07c1b73
commit aa35ea98a3
No known key found for this signature in database
GPG Key ID: 6BE1B64B905567C7

View File

@ -28,7 +28,11 @@ async def get_response(retry = 0):
req = await Httpx.AsyncRequest('https://mirror.ghproxy.com/' + baseurl) req = await Httpx.AsyncRequest('https://mirror.ghproxy.com/' + baseurl)
else: else:
req = await Httpx.AsyncRequest(baseurl) req = await Httpx.AsyncRequest(baseurl)
except: except Exception as e:
if (isinstance(e, RuntimeError)):
if ('Session is closed' in str(e)):
logger.error('脚本更新失败clientSession已被关闭')
return
return await get_response(retry + 1) return await get_response(retry + 1)
return req return req