mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +03:00
Don't fail timeouts when slow request being processed
This commit is contained in:
parent
7c330e71fa
commit
074f73acb4
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user