def shutdown(self, tid=None):
        delay = 120
        if tid is None:
            delay = 0
        when = time_now() - delay
        with self._available:
            if tid is None: # global shutdown, also close active connections
                for db, num in self._active.values():
                    db.close()
                self._active = {}
            while self._pool_time and self._pool_time[0] <= when:
                db = self._pool.pop(0)
                db.close()
                self._pool_key.pop(0)
                self._pool_time.pop(0)
Turn the prefix length netmask into a int for comparison.
dataset/ETHPy150Open edgewall/trac/trac/db/pool.py/ConnectionPoolBackend.shutdown--crossover with--dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/ipaddress.py/_IPAddressBase._ip_int_from_prefix