fix timeout error
This commit is contained in:
parent
a94cf04e87
commit
bfaebf0085
3 changed files with 3 additions and 3 deletions
|
@ -100,6 +100,6 @@ class AsyncGeneratorJunction:
|
|||
pass
|
||||
finally:
|
||||
if exc_type:
|
||||
if exc_type not in (asyncio.CancelledError, asyncio.TimeoutError, StopAsyncIteration):
|
||||
if exc_type not in (asyncio.CancelledError, asyncio.TimeoutError, StopAsyncIteration, GeneratorExit):
|
||||
err = traceback.format_exception(exc_type, exc, tb)
|
||||
log.error(err)
|
||||
|
|
|
@ -218,7 +218,7 @@ class PingQueue:
|
|||
await self._protocol.add_peer(p)
|
||||
return
|
||||
await self._protocol.get_rpc_peer(p).ping()
|
||||
except TimeoutError:
|
||||
except asyncio.TimeoutError:
|
||||
pass
|
||||
|
||||
while True:
|
||||
|
|
|
@ -2815,7 +2815,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
try:
|
||||
result = await peer.ping()
|
||||
return result.decode()
|
||||
except TimeoutError:
|
||||
except asyncio.TimeoutError:
|
||||
return {'error': 'ping timeout'}
|
||||
|
||||
@requires(DHT_COMPONENT)
|
||||
|
|
Loading…
Reference in a new issue