Fix logic

- thanks @g1itch!
This commit is contained in:
Peter Šurda 2019-01-03 08:13:15 +01:00
parent 4ad6401449
commit 585b56cd2b
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -109,7 +109,7 @@ class RandomTrackingDict(object):
with self.lock: with self.lock:
# reset if we've requested all # reset if we've requested all
# and if last object received too long time ago # and if last object received too long time ago
if self.pendingLen == self.len and self.lastObject + self.pendingTimeout > time(): if self.pendingLen == self.len and self.lastObject + self.pendingTimeout < time():
self.pendingLen = 0 self.pendingLen = 0
self.setLastObject() self.setLastObject()
available = self.len - self.pendingLen available = self.len - self.pendingLen