forked from LBRYCommunity/lbry-sdk
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 logging
|
||||
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 typing import TYPE_CHECKING
|
||||
|
@ -169,7 +169,7 @@ class IterativeFinder:
|
|||
log.warning(str(err))
|
||||
self.active.discard(peer)
|
||||
return
|
||||
except RemoteException:
|
||||
except (RemoteException, TransportNotConnected):
|
||||
return
|
||||
return await self._handle_probe_result(peer, response)
|
||||
|
||||
|
@ -215,7 +215,7 @@ class IterativeFinder:
|
|||
await self._search_round()
|
||||
if self.running:
|
||||
self.delayed_calls.append(self.loop.call_later(delay, self._search))
|
||||
except (asyncio.CancelledError, StopAsyncIteration):
|
||||
except (asyncio.CancelledError, StopAsyncIteration, TransportNotConnected):
|
||||
if self.running:
|
||||
self.loop.call_soon(self.aclose)
|
||||
|
||||
|
|
Loading…
Reference in a new issue