Skip to content

Commit

Permalink
fix: 尝试修复在快速启动然后停止时报出大屏错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Jan 5, 2024
1 parent aeb07c1 commit aa35ea9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/lx_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ async def get_response(retry = 0):
req = await Httpx.AsyncRequest('https://mirror.ghproxy.com/' + baseurl)
else:
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 req

Expand Down

0 comments on commit aa35ea9

Please sign in to comment.