From 5708a38be0b6c96043e39a16f2f3430aa1d4114d Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 17 Jan 2017 01:07:39 +0100 Subject: [PATCH] Fix sending messages crashing --- src/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inventory.py b/src/inventory.py index 0a102d0a..1036d07e 100644 --- a/src/inventory.py +++ b/src/inventory.py @@ -178,7 +178,7 @@ class Missing(object): with self.lock: if objectHash in self.hashes: 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() for thread in self.pending.keys(): with self.lock: