this is followup to Iaab5ce609c0dcf7085f5dd43efbd37eb4b88f17b
actually retry for specified number of retries instead of raising
error on first ConnectionError
Change-Id: Ibca3f568b65dfea252da4b67f6d5105ba7f1ecb1
(cherry picked from commit 47c4d56e44)
(cherry picked from commit 11526e594c)