Add a missing check in case of close_if_idle on a dead connection.
This commit is contained in:
parent
9c21457b58
commit
c2e5674a73
|
@ -192,7 +192,7 @@ class HttpProtocol(asyncio.Protocol):
|
|||
|
||||
:return: boolean - True if closed, false if staying open
|
||||
"""
|
||||
if self._http.stage is Stage.IDLE:
|
||||
if self._http is None or self._http.stage is Stage.IDLE:
|
||||
self.close()
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue
Block a user