1
0

synchronizer: fix rare race where synchronizer could get stuck

This commit is contained in:
SomberNight
2021-03-05 20:46:41 +01:00
parent 34413a9c30
commit 1dbff51fce
4 changed files with 22 additions and 12 deletions

View File

@@ -74,9 +74,10 @@ class SynchronizerBase(NetworkJobOnDefaultServer):
self.add_queue = asyncio.Queue()
self.status_queue = asyncio.Queue()
async def _start_tasks(self):
async def _run_tasks(self, *, taskgroup):
await super()._run_tasks(taskgroup=taskgroup)
try:
async with self.taskgroup as group:
async with taskgroup as group:
await group.spawn(self.send_subscriptions())
await group.spawn(self.handle_status())
await group.spawn(self.main())