def cancelTimeout(self):
        """
        Cancel the timeout.

        If the timeout was already cancelled, this does nothing.
        """
        self.timeoutPeriod = None
        if self.timeoutCall:
            try:
                self.timeoutCall.cancel()
            except (error.AlreadyCalled, error.AlreadyCancelled):
                pass
            self.timeoutCall = None

        Cancel the timeout.

        If the timeout was already cancelled, this does nothing.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/policies.py