Try to prevent leaking timeouts.

This commit is contained in:
Itamar Turner-Trauring 2022-09-20 10:09:43 -04:00
parent ef0b2aca17
commit 4b2725df00

View File

@ -151,6 +151,10 @@ class _FoolscapOrHttps(Protocol, metaclass=_PretendToBeNegotiation):
30, self.transport.abortConnection
)
def connectionLost(self, reason):
if self._timeout.active():
self._timeout.cancel()
def dataReceived(self, data: bytes) -> None:
"""Handle incoming data.