From bdba26322466aeac2343ada43ffb8b331a49acb5 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 20 Feb 2018 13:40:02 -0500 Subject: [PATCH] catch TimeoutError in _IterativeFindHelper --- lbrynet/dht/node.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/dht/node.py b/lbrynet/dht/node.py index 8b992eacd..1a7985c66 100644 --- a/lbrynet/dht/node.py +++ b/lbrynet/dht/node.py @@ -17,6 +17,7 @@ import constants import routingtable import datastore import protocol +from error import TimeoutError from peermanager import PeerManager from hashannouncer import DHTHashAnnouncer @@ -799,7 +800,7 @@ class _IterativeFindHelper(object): def removeFromShortlist(self, failure, deadContactID): """ @type failure: twisted.python.failure.Failure """ - failure.trap(protocol.TimeoutError) + failure.trap(TimeoutError, defer.CancelledError, TypeError) if len(deadContactID) != constants.key_bits / 8: raise ValueError("invalid lbry id") if deadContactID in self.shortlist: