diff --git a/src/pipecat/utils/asyncio/task_manager.py b/src/pipecat/utils/asyncio/task_manager.py index b41a571c9..d64e29c96 100644 --- a/src/pipecat/utils/asyncio/task_manager.py +++ b/src/pipecat/utils/asyncio/task_manager.py @@ -157,7 +157,7 @@ class TaskManager(BaseTaskManager): async def run_coroutine(): try: - await coroutine + return await coroutine except asyncio.CancelledError: logger.trace(f"{name}: task cancelled") # Re-raise the exception to ensure the task is cancelled.