From 0a2c6c2ff230a5d65706de5a3cc8e2670cf9d71c Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 21 Feb 2018 09:50:59 -0800 Subject: [PATCH] Fix #175: Check finished as well as channel --- daphne/http_protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index 7044109..97a28a0 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -190,7 +190,7 @@ class WebRequest(http.Request): Handles a reply from the client """ # Handle connections that are already closed - if self.channel is None: + if self.finished or self.channel is None: return # Check message validity if "type" not in message: