From c979481564d0f4580244d3eec72ebeadd7d137aa Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 3 Feb 2017 09:43:47 +0100 Subject: [PATCH] Unhandled missing peer --- src/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inventory.py b/src/inventory.py index 2bdb3629..99b4ca4d 100644 --- a/src/inventory.py +++ b/src/inventory.py @@ -184,7 +184,7 @@ class PendingDownload(object): self.pending[current_thread().peer]['received'] = time.time() for thread in self.pending.keys(): with self.lock: - if objectHash in self.pending[thread]['objects']: + if thread in self.pending and objectHash in self.pending[thread]['objects']: self.pending[thread]['objects'].remove(objectHash) def stop(self):