mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
catch TransportNotConnected
This commit is contained in:
parent
33a68b5cef
commit
3a53ef5690
1 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ from itertools import chain
|
||||||
import typing
|
import typing
|
||||||
import logging
|
import logging
|
||||||
from lbrynet.dht import constants
|
from lbrynet.dht import constants
|
||||||
from lbrynet.dht.error import RemoteException
|
from lbrynet.dht.error import RemoteException, TransportNotConnected
|
||||||
from lbrynet.dht.protocol.distance import Distance
|
from lbrynet.dht.protocol.distance import Distance
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
@ -169,7 +169,7 @@ class IterativeFinder:
|
||||||
log.warning(str(err))
|
log.warning(str(err))
|
||||||
self.active.discard(peer)
|
self.active.discard(peer)
|
||||||
return
|
return
|
||||||
except RemoteException:
|
except (RemoteException, TransportNotConnected):
|
||||||
return
|
return
|
||||||
return await self._handle_probe_result(peer, response)
|
return await self._handle_probe_result(peer, response)
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ class IterativeFinder:
|
||||||
await self._search_round()
|
await self._search_round()
|
||||||
if self.running:
|
if self.running:
|
||||||
self.delayed_calls.append(self.loop.call_later(delay, self._search))
|
self.delayed_calls.append(self.loop.call_later(delay, self._search))
|
||||||
except (asyncio.CancelledError, StopAsyncIteration):
|
except (asyncio.CancelledError, StopAsyncIteration, TransportNotConnected):
|
||||||
if self.running:
|
if self.running:
|
||||||
self.loop.call_soon(self.aclose)
|
self.loop.call_soon(self.aclose)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue