From af7fcc66fd9d5d85fb180c10c0b5892dbd63befe Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Sun, 11 Dec 2022 09:15:03 -0500 Subject: [PATCH 1/2] fix missing modules when building via pyinstaller --- relay.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/relay.spec b/relay.spec index 57fedc7..c21a829 100644 --- a/relay.spec +++ b/relay.spec @@ -9,7 +9,13 @@ a = Analysis( pathex=[], binaries=[], datas=[], - hiddenimports=[], + hiddenimports=[ + 'aputils.enums', + 'aputils.errors', + 'aputils.misc', + 'aputils.objects', + 'aputils.signer' + ], hookspath=[], hooksconfig={}, runtime_hooks=[], From 3aba68866f929d30f4ce1a0518fc6150df9676d4 Mon Sep 17 00:00:00 2001 From: Sylvain Jones Date: Wed, 21 Dec 2022 15:31:05 -0700 Subject: [PATCH 2/2] Added more exception checking in http_client.py. --- relay/http_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay/http_client.py b/relay/http_client.py index 8802471..f38a6f5 100644 --- a/relay/http_client.py +++ b/relay/http_client.py @@ -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