Added more exception checking in http_client.py.
This commit is contained in:
parent
af7fcc66fd
commit
3aba68866f
1 changed files with 3 additions and 2 deletions
|
@ -2,7 +2,8 @@ import logging
|
|||
import traceback
|
||||
|
||||
from aiohttp import ClientSession, ClientTimeout, TCPConnector
|
||||
from aiohttp.client_exceptions import ClientConnectorError, ServerTimeoutError
|
||||
from aiohttp.client_exceptions import ClientConnectorError, ServerTimeoutError, ServerDisconnectedError
|
||||
from asyncio.exceptions import TimeoutError
|
||||
from aputils import Nodeinfo, WellKnownNodeinfo
|
||||
from datetime import datetime
|
||||
from cachetools import LRUCache
|
||||
|
@ -158,7 +159,7 @@ class HttpClient:
|
|||
logging.verbose(f'Received error when pushing to {url}: {resp.status}')
|
||||
return logging.verbose(await resp.read()) # change this to debug
|
||||
|
||||
except (ClientConnectorError, ServerTimeoutError):
|
||||
except (ClientConnectorError, ServerTimeoutError, TimeoutError, ServerDisconnectedError):
|
||||
logging.verbose(f'Failed to connect to {url}')
|
||||
|
||||
## prevent workers from being brought down
|
||||
|
|
Loading…
Reference in a new issue