mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-09 03:44:23 +00:00
key_generator: fix edge case found on windows
the windows (cygwin) buildslave has been failing the key generator test it turns out that the time check on whether to refill the pool, and the reactor, are interacting such that when the maybe_refill_pool call posted on the reactor fires, the test on whether to fill the pool fails. this adds a loop in the failure case to retry each 1s until it is time to refill the pool, thus mitigating this timing accuracy problem on windows.
This commit is contained in:
parent
35319c3380
commit
8620c7271d
@ -55,6 +55,7 @@ class KeyGenerator(service.MultiService, foolscap.Referenceable):
|
||||
self.keypool.append(self.gen_key(self.DEFAULT_KEY_SIZE))
|
||||
else:
|
||||
self.vlog('%s not refilling pool' % (self,))
|
||||
reactor.callLater(1, self.maybe_refill_pool)
|
||||
|
||||
def gen_key(self, key_size):
|
||||
self.vlog('%s generating key size %s' % (self, key_size, ))
|
||||
|
Loading…
x
Reference in New Issue
Block a user