forked from LBRYCommunity/lbry-sdk
catch TimeoutError in _IterativeFindHelper
This commit is contained in:
parent
16fcc3f5c1
commit
bdba263224
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ import constants
|
||||||
import routingtable
|
import routingtable
|
||||||
import datastore
|
import datastore
|
||||||
import protocol
|
import protocol
|
||||||
|
from error import TimeoutError
|
||||||
|
|
||||||
from peermanager import PeerManager
|
from peermanager import PeerManager
|
||||||
from hashannouncer import DHTHashAnnouncer
|
from hashannouncer import DHTHashAnnouncer
|
||||||
|
@ -799,7 +800,7 @@ class _IterativeFindHelper(object):
|
||||||
|
|
||||||
def removeFromShortlist(self, failure, deadContactID):
|
def removeFromShortlist(self, failure, deadContactID):
|
||||||
""" @type failure: twisted.python.failure.Failure """
|
""" @type failure: twisted.python.failure.Failure """
|
||||||
failure.trap(protocol.TimeoutError)
|
failure.trap(TimeoutError, defer.CancelledError, TypeError)
|
||||||
if len(deadContactID) != constants.key_bits / 8:
|
if len(deadContactID) != constants.key_bits / 8:
|
||||||
raise ValueError("invalid lbry id")
|
raise ValueError("invalid lbry id")
|
||||||
if deadContactID in self.shortlist:
|
if deadContactID in self.shortlist:
|
||||||
|
|
Loading…
Reference in a new issue