'We are no longer connected'

def connectionLost(self, reason):

    if (self.timeout > 0):
        self.setTimeout(None)
    if (self.queued is not None):
        queued = self.queued
        self.queued = None
        for cmd in queued:
            cmd.defer.errback(reason)
    if (self.tags is not None):
        tags = self.tags
        self.tags = None
        for cmd in tags.values():
            if ((cmd is not None) and (cmd.defer is not None)):
                cmd.defer.errback(reason)
