def remove_chain(self, name, wrap=True):
        if wrap:
            chain_set = self.chains
        else:
            chain_set = self.unwrapped_chains

        if name not in chain_set:
            LOG.warning(_LW('Attempted to remove chain %s which does not '
                            'exist'), name)
            return
        self.dirty = True

        # non-wrapped chains and rules need to be dealt with specially,
        # so we keep a list of them to be iterated over in apply()
        if not wrap:
            self.remove_chains.add(name)
        chain_set.remove(name)
        if not wrap:
            self.remove_rules += [r for r in self.rules if r.chain == name]
        self.rules = [r for r in self.rules if r.chain != name]

        if wrap:
            jump_snippet = '-j %s-%s' % (binary_name, name)
        else:
            jump_snippet = '-j %s' % (name,)

        if not wrap:
            self.remove_rules += [r for r in self.rules
                                  if jump_snippet in r.rule]
        self.rules = [r for r in self.rules if jump_snippet not in r.rule]
Closes the connection. An error will occur if the
dataset/ETHPy150Open openstack/nova/nova/network/linux_net.py/IptablesTable.remove_chain--crossover with--dataset/ETHPy150Open airbnb/airflow/airflow/contrib/hooks/ftp_hook.py/FTPHook.close_conn