closing the connection pool correctly.