From 9197c425d228468f13b1599508b157e4993386bd Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 17 Jan 2017 00:32:05 +0100 Subject: [PATCH] Object requesting fix --- src/inventory.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/inventory.py b/src/inventory.py index 579c1159..0a102d0a 100644 --- a/src/inventory.py +++ b/src/inventory.py @@ -178,15 +178,11 @@ class Missing(object): with self.lock: if objectHash in self.hashes: del self.hashes[objectHash] - self.pending[current_thread().peer]['received'] = time.time() - toDelete = [] + if current_thread().peer in self.pending: + self.pending[current_thread().peer]['received'] = time.time() for thread in self.pending.keys(): with self.lock: if objectHash in self.pending[thread]['objects']: - toDelete.append(objectHash) - for thread in toDelete: - with self.lock: - if thread in self.pending: self.pending[thread]['objects'].remove(objectHash) def stop(self):