fix close function of connection pool.