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.
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, ))