diff --git a/server/reflector/asynctask.py b/server/reflector/asynctask.py index 50f25448..36a5fd1d 100644 --- a/server/reflector/asynctask.py +++ b/server/reflector/asynctask.py @@ -22,6 +22,8 @@ def asynctask(f): await database.disconnect() coro = run_with_db() + if current_task: + return asyncio.run(coro) try: loop = asyncio.get_running_loop() except RuntimeError: