Keep retryIndex from reaching out of bounds of the end point array.