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

Connection.disconnect: Task was destroyed but it is pending! #328

Closed
bellini666 opened this issue Sep 19, 2022 · 0 comments · Fixed by #329
Closed

Connection.disconnect: Task was destroyed but it is pending! #328

bellini666 opened this issue Sep 19, 2022 · 0 comments · Fixed by #329

Comments

@bellini666
Copy link
Contributor

This is similar to #327 but happens when using RedisPubSubChannelLayer:

Task was destroyed but it is pending!
task: <Task pending name='Task-133' coro=<Connection.disconnect() running at /home/bellini/dev/2u/backend/.venv/lib/python3.10/site-packages/redis/asyncio/connection.py:837> wait_for=<Future finished result=None>

Like the other issue, it seems that it happens because the connection gets disconnected from the __del__ method, but in this case the loop is already closed and cannot run it.

The fix here is trivial and I'm already opening a PR for it in a few minutes.

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