From 38641d8522b243c24f5dacb466828649f35f75cc Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 31 May 2016 19:04:12 +0000 Subject: [PATCH] Fixed #182: Close response once we're done with it --- channels/handler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/channels/handler.py b/channels/handler.py index ec03f4c..8902cdf 100644 --- a/channels/handler.py +++ b/channels/handler.py @@ -212,6 +212,8 @@ class AsgiHandler(base.BaseHandler): for message in self.encode_response(response): # TODO: file_to_stream yield message + # Close the response now we're done with it + response.close() def process_exception_by_middleware(self, exception, request): """