Fix the wait in case of the server being unreachable

Replace a Math.max with a Math.min.
The maxExponent is set by default to 6 which results in a maximum
wait of about 60 seconds.