Terminate check_timeouts once connection_task finishes.
This commit is contained in:
parent
85b1ad5732
commit
8a1baeb9d5
|
@ -202,6 +202,8 @@ class HttpProtocol(asyncio.Protocol):
|
||||||
|
|
||||||
def check_timeouts(self):
|
def check_timeouts(self):
|
||||||
"""Runs itself once a second to enforce any expired timeouts."""
|
"""Runs itself once a second to enforce any expired timeouts."""
|
||||||
|
if not self._task:
|
||||||
|
return
|
||||||
duration = current_time() - self._time
|
duration = current_time() - self._time
|
||||||
lifespan = self._http.lifespan
|
lifespan = self._http.lifespan
|
||||||
if lifespan == Lifespan.IDLE and duration > self.keep_alive_timeout:
|
if lifespan == Lifespan.IDLE and duration > self.keep_alive_timeout:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user