Skip to content

Commit

Permalink
don't keep client tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 23, 2024
1 parent 9eb9152 commit bb6accc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bbot/core/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,9 @@ async def _shutdown(self):

def new_child_task(self, client_id, coro):
task = asyncio.create_task(coro)
def remove_task():
self.child_tasks.get(client_id, set()).discard(task)
task.add_done_callback(remove_task)
try:
self.child_tasks[client_id].add(task)
except KeyError:
Expand Down

0 comments on commit bb6accc

Please sign in to comment.