merge a couple lines

This commit is contained in:
Connor Olding 2021-08-14 17:42:22 -07:00
parent 6508ee1210
commit 44e2a491a0

View file

@ -169,8 +169,7 @@ async def try_ip(db, server_ip, checks, context, opts: Options, callback=None):
await sem.acquire()
if not success:
break
task = create_task(process(check))
tasks.append(task)
tasks.append(create_task(process(check)))
for task in tasks:
try:
await task
@ -225,8 +224,7 @@ async def try_all_ips(db, try_me, checks, context, opts: Options, callback=None)
# acquire now instead of within the task so
# a ton of tasks aren't created all at once.
await sem.acquire()
task = create_task(process(ip))
tasks.append(task)
tasks.append(create_task(process(ip)))
for task in tasks:
await task