Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not awaiting forward task #1339

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

martin-purplefish
Copy link
Contributor

@martin-purplefish martin-purplefish commented Jan 6, 2025

Really just wrapping in a try block!

This would cause errors like:

{"message": "Task was destroyed but it is pending!\ntask: <Task pending name='Task-124' coro=<TTSSegmentsForwarder._main_task.<locals>._forward_task() running at /app/.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py:16> wait_for=<Future pending cb=[Task.task_wakeup()]>>", "level": "ERROR", "name": "asyncio", "pid": 1923, "job_id": "AJ_VKu3CSTZGMS9", "timestamp": "2025-01-06T18:11:34.516550+00:00"}

Fixes: #1264

Copy link

changeset-bot bot commented Jan 6, 2025

🦋 Changeset detected

Latest commit: dd47995

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@martin-purplefish
Copy link
Contributor Author

PTAL @davidzhao @theomonnom

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TTS Forwarder doesn't clean up pending task on aclose
2 participants