Download thread exception handling
This commit is contained in:
parent
8498143783
commit
57c8c7c07c
|
@ -55,7 +55,10 @@ class DownloadThread(threading.Thread, StoppableThread):
|
||||||
payload.extend(addresses.encodeVarint(len(request)))
|
payload.extend(addresses.encodeVarint(len(request)))
|
||||||
for chunk in request:
|
for chunk in request:
|
||||||
if chunk in Inventory():
|
if chunk in Inventory():
|
||||||
del i.objectsNewToMe[chunk]
|
try:
|
||||||
|
del i.objectsNewToMe[chunk]
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
continue
|
continue
|
||||||
payload.extend(chunk)
|
payload.extend(chunk)
|
||||||
missingObjects[chunk] = now
|
missingObjects[chunk] = now
|
||||||
|
|
Loading…
Reference in New Issue
Block a user