close connection on resultset completion