Adds exponential waiting to retry logic.