diff options
| author | VaĊĦek Dohnal <vaclav.dohnal@gmail.com> | 2024-02-08 09:21:03 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-02-08 11:36:28 +0100 |
| commit | 1b5338d03ecc962af8ab4678426bc60b0672b8dd (patch) | |
| tree | 5936e236cbd7a17ce79e6aff5111dd39157a9412 /django/dispatch | |
| parent | 2f14c2cedc9c92373471c1f98a80c81ba299584a (diff) | |
Fixed #35174 -- Fixed Signal.asend()/asend_robust() crash when all receivers are asynchronous.
Regression in e83a88566a71a2353cebc35992c110be0f8628af.
Diffstat (limited to 'django/dispatch')
| -rw-r--r-- | django/dispatch/dispatcher.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py index 26ef09ce49..fe0e1fa599 100644 --- a/django/dispatch/dispatcher.py +++ b/django/dispatch/dispatcher.py @@ -244,7 +244,9 @@ class Signal: return responses else: - sync_send = list + + async def sync_send(): + return [] responses, async_responses = await asyncio.gather( sync_send(), @@ -380,7 +382,9 @@ class Signal: return responses else: - sync_send = list + + async def sync_send(): + return [] async def asend_and_wrap_exception(receiver): try: |
