Skip to content

Commit

Permalink
BUG修复: 请求量过大时导致的LCU客户端闪退, 最大并发数改为2 Zzaphkiel#158
Browse files Browse the repository at this point in the history
BUG修复: "显示对局数"过高导致的LCU API拒绝请求, 该选项的上限值设置为60 Zzaphkiel#170
易用性: 为检测LCU启动的未知错误添加了异常抛出, 再次遇到时可以具体定位问题 Zzaphkiel#174
  • Loading branch information
Hpero4 committed Dec 26, 2023
1 parent 8f09035 commit d23d92c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Config(QConfig):
restart=True)

careerGamesNumber = RangeConfigItem("Functions", "CareerGamesNumber", 20,
RangeValidator(1, 999))
RangeValidator(1, 60))

teamGamesNumber = RangeConfigItem("Functions", "TeamGamesNumber", 1,
RangeValidator(1, 10))
Expand Down
2 changes: 1 addition & 1 deletion app/lol/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def decorator(func):
def wrapper(*args, **kwargs):
exce = None
for _ in range(count):
while connector.ref_cnt >= 3:
while connector.ref_cnt >= 2:
time.sleep(.2)

connector.ref_cnt += 1
Expand Down
5 changes: 4 additions & 1 deletion app/lol/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ def getLolProcessPid():

if b'LeagueClientUx.exe' in processes:
arr = processes.split()
return int(arr[1])
try:
return int(arr[1])
except ValueError:
raise ValueError(f"Subprocess return exception: {processes}")
else:
return 0

Expand Down

0 comments on commit d23d92c

Please sign in to comment.