Fixed ExponentialBackoff not working when integral

This commit is contained in:
Matt Gardner 2017-08-07 22:46:42 -04:00 committed by Rapptz
parent 8acf3d01ce
commit f490afa5dc

View File

@ -61,7 +61,7 @@ class ExponentialBackoff:
rand = random.Random()
rand.seed()
self._randfunc = rand.rand_range if integral else rand.uniform
self._randfunc = rand.randrange if integral else rand.uniform
def delay(self):
"""Compute the next delay