'Close all pooled connections and disable the pool.'

def close(self):

    (old_pool, self.pool) = (self.pool, None)
    try:
        while True:
            conn = old_pool.get(block=False)
            if conn:
                conn.close()
    except Empty:
        pass
