Do not re-request invalid objects

This commit is contained in:
TheKysek 2017-07-11 13:00:04 +02:00
parent df665813ac
commit ef2b3bba0a
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497

View File

@ -293,6 +293,8 @@ class Connection(threading.Thread):
elif m.command == b'object':
obj = structure.Object.from_message(m)
logging.debug('{}:{} -> {}'.format(self.host_print, self.port, obj))
del self.vectors_requested[obj.vector]
self.vectors_to_get.remove(obj.vector)
if obj.is_valid() and obj.vector not in shared.objects:
with shared.objects_lock:
shared.objects[obj.vector] = obj