We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbdd78c commit f3363ecCopy full SHA for f3363ec
1 file changed
django/core/handlers/asgi.py
@@ -233,14 +233,15 @@ async def process_request(request, send):
233
except asyncio.CancelledError:
234
# Task re-raised the CancelledError as expected.
235
pass
236
- body_file.close()
237
238
try:
239
response = get_response_task.result()
240
await sync_to_async(response.close)()
241
242
await signals.request_finished.asend(sender=self.__class__)
243
+ body_file.close()
244
+
245
async def listen_for_disconnect(self, receive):
246
"""Listen for disconnect from the client."""
247
message = await receive()
0 commit comments