'Remove a connection, it was closed by the server.
:param conn: Connection to remove
:param host: The host for to the connection. If passed, the connection
will be removed faster.'

def remove_connection(self, conn, host=None, reason=UNKNOWN):

    conn.close()
    with self._lock:
        removed_from_hostmap = False
        if host:
            if (host in self._hostmap):
                if (conn in self._hostmap[host]):
                    self._hostmap[host].remove(conn)
                    removed_from_hostmap = True
        else:
            for (_host, conns) in self._hostmap.items():
                if (conn in conns):
                    host = _host
                    conns.remove(conn)
                    removed_from_hostmap = True
                    break
        if (not removed_from_hostmap):
            msg = '%s    was    NOT    removed    from    hostmap    pool.'
            debug((msg % conn))
        removed_from_free_or_used = False
        for lst in (self._free_conns, self._used_cons):
            try:
                lst.remove(conn)
            except ValueError:
                pass
            else:
                removed_from_free_or_used = True
        if (not removed_from_free_or_used):
            msg = '%s    was    NOT    in    free/used    connection    lists.'
            debug((msg % conn))
        conn_total = self.get_connections_total(host)
        if (host and (host in self._hostmap) and (not conn_total)):
            del self._hostmap[host]
        msg = 'Removed    %s,    reason    %s,    %s    pool    size    is    %s'
        debug((msg % (conn, reason, host, conn_total)))
