Unhandled missing peer

This commit is contained in:
Peter Šurda 2017-02-03 09:43:47 +01:00
parent ba130e03e5
commit c979481564
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -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):