fix uncaught CancelledError in peer_list

This commit is contained in:
Jack Robison 2017-10-11 14:05:03 -04:00
parent 8c79421790
commit 78ad87d349
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -46,7 +46,10 @@ class DHTPeerFinder(object):
if timeout is not None: if timeout is not None:
reactor.callLater(timeout, _trigger_timeout) reactor.callLater(timeout, _trigger_timeout)
peer_list = yield finished_deferred try:
peer_list = yield finished_deferred
except defer.CancelledError:
peer_list = []
peers = set(peer_list) peers = set(peer_list)
good_peers = [] good_peers = []