From 074f73acb409c05bbf0ccc440b10fe88b611015f Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 3 Apr 2016 20:56:48 -0700 Subject: [PATCH] Don't fail timeouts when slow request being processed --- daphne/http_protocol.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py index 2c49887..138aea1 100755 --- a/daphne/http_protocol.py +++ b/daphne/http_protocol.py @@ -184,6 +184,8 @@ class WebRequest(http.Request): """ Returns the time since the start of the request. """ + if not hasattr(self, "request_start"): + return 0 return time.time() - self.request_start def basic_error(self, status, status_text, body):