[Answered ]-Cannot use sync_to_async decorator after raising asyncio.CancelledError

1👍

This is a bug in sync_to_async introduced in asgiref 3.3.1.

https://github.com/django/asgiref/issues/247

This can be resolved using the built-in asyncio functionality or, if that is not possible, wrapping the failing coroutine in create_task.

Leave a comment