Skip to content

Commit

Permalink
Merge pull request #179 from Hpero4/bugfix
Browse files Browse the repository at this point in the history
LCU API 并发修改为 2,显示对局数上限改为 60,客户端启动错误增加异常抛出 (#158#170)
  • Loading branch information
Zzaphkiel committed Dec 27, 2023
2 parents 8f09035 + d23d92c commit 6e2494d
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 6e2494d

Please sign in to comment.