Fixed tunnel stop comms

This commit is contained in:
Adolfo Gómez García 2022-01-11 15:36:18 +01:00
parent edb4a32496
commit efd0ca3f88
2 changed files with 5 additions and 7 deletions

View File

@ -236,9 +236,6 @@ class TicketStore(UUIDModel):
# if not found any, will raise an execption # if not found any, will raise an execption
user = User.objects.get(uuid=data['u']) user = User.objects.get(uuid=data['u'])
userService = UserService.objects.get(uuid=data['s'], user=user) userService = UserService.objects.get(uuid=data['s'], user=user)
# Ensure userservice is usable
if not userService.isUsable():
raise Exception('Service is not usable') # Not usable, so we will not use it :)
host = data['h'] host = data['h']

View File

@ -165,11 +165,12 @@ async def tunnel_proc_async(
async with curio.TaskGroup() as tg: async with curio.TaskGroup() as tg:
await tg.spawn(run_server, pipe, cfg, tg) await tg.spawn(run_server, pipe, cfg, tg)
await tg.join()
# Reap all of the children tasks as they complete # Reap all of the children tasks as they complete
async for task in tg: # async for task in tg:
logger.debug(f'REMOVING async task {task!r}') # logger.debug(f'REMOVING async task {task!r}')
task.joined = True # task.joined = True
del task # del task
def tunnel_main(): def tunnel_main():