def _disconnected(self, factory):
        """
        Called when the connection for this factory is gone.
        """
        self.factories.remove(factory)
        factory.deferred.addCallback(lambda _: self._reconnected(factory))