The inner loop has an abort condition in the for expression, it checks for !res.first along with the vector size check. That means as soon as a retryable error is noticed, res.first flips, and the inner loop never runs again. The outer loop keeps going basically for logging reasons. As I said, this code is awful. -- Scott