Fix sending messages crashing

This commit is contained in:
Peter Šurda 2017-01-17 01:07:39 +01:00
parent 9197c425d2
commit 5708a38be0
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -178,7 +178,7 @@ class Missing(object):
with self.lock: with self.lock:
if objectHash in self.hashes: if objectHash in self.hashes:
del self.hashes[objectHash] del self.hashes[objectHash]
if current_thread().peer in self.pending: if hasattr(current_thread(), 'peer') and current_thread().peer in self.pending:
self.pending[current_thread().peer]['received'] = time.time() self.pending[current_thread().peer]['received'] = time.time()
for thread in self.pending.keys(): for thread in self.pending.keys():
with self.lock: with self.lock: