def close(self):
        self._condition.acquire()
        try:
            while self._idle_cache: # close all idle connections
                con = self._idle_cache.pop(0)
                try:
                    con._close()
                except Exception:
                    pass
                self._connections -=1
            self._condition.notifyAll()
        finally:
            self._condition.release()
Exception is trapped from resource with invalid id.
dataset/ETHPy150Open bitly/asyncmongo/asyncmongo/pool.py/ConnectionPool.close--crossover with--dataset/ETHPy150Open edgewall/trac/trac/ticket/tests/api.py/TicketSystemTestCase.test_resource_exists_invalid_resource_id