Download thread exception handling

This commit is contained in:
Peter Šurda 2018-02-01 23:18:08 +01:00
parent 8498143783
commit 57c8c7c07c
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -55,7 +55,10 @@ class DownloadThread(threading.Thread, StoppableThread):
payload.extend(addresses.encodeVarint(len(request)))
for chunk in request:
if chunk in Inventory():
try:
del i.objectsNewToMe[chunk]
except KeyError:
pass
continue
payload.extend(chunk)
missingObjects[chunk] = now