before process

This commit is contained in:
38elements 2016-11-26 16:47:16 +09:00
parent a5e6d6d2e8
commit ee89b6ad03

View File

@ -78,7 +78,8 @@ class HttpProtocol(asyncio.Protocol):
self._timeout_handler = \
self.loop.call_later(time_left, self.connection_timeout)
else:
self._request_handler_task.cancel()
if self._request_handler_task:
self._request_handler_task.cancel()
response = self.error_handler.response(
self.request, RequestTimeout('Request Timeout'))
self.write_response(response)