From cc5f0b66301c56866f18fd650a91cb1818bdb29c Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 1 Dec 2022 18:07:56 -0300 Subject: [PATCH] handle remote exception on routing table ping --- lbry/dht/protocol/routing_table.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbry/dht/protocol/routing_table.py b/lbry/dht/protocol/routing_table.py index 11b64b8f7..cb5c55960 100644 --- a/lbry/dht/protocol/routing_table.py +++ b/lbry/dht/protocol/routing_table.py @@ -8,6 +8,7 @@ from prometheus_client import Gauge from lbry import utils from lbry.dht import constants +from lbry.dht.error import RemoteException from lbry.dht.protocol.distance import Distance if typing.TYPE_CHECKING: from lbry.dht.peer import KademliaPeer, PeerManager @@ -395,7 +396,7 @@ class TreeRoutingTable: try: await probe(to_replace) return False - except asyncio.TimeoutError: + except (asyncio.TimeoutError, RemoteException): log.debug("Replacing dead contact in bucket %i: %s:%i with %s:%i ", bucket_index, to_replace.address, to_replace.udp_port, peer.address, peer.udp_port) if to_replace in self.buckets[bucket_index]: