Make sure the metric client closes