def clientConnectionFailed(self, connector, reason):
        """
        Arrange to fire the waiting L{Deferred} with the given failure to
        indicate the connection could not be established.
        """
        self.pending = self.reactor.callLater(
            0, self.fire, self.deferred.errback, reason)
        self.deferred = None

        Arrange to fire the waiting L{Deferred} with the given failure to
        indicate the connection could not be established.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/protocol.py