'Stop attempting to connect.'

def stopConnecting(self):

    if (self.state != 'connecting'):
        raise error.NotConnectingError("we're    not    trying    to    connect")
    self.state = 'disconnected'
    self.transport.failIfNotConnected(error.UserError())
    del self.transport
