diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f9b4cf..fb3d0ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +- catch socket.gaierror exception and log this with info level - Update dependency coverage to v7.9.2 - add-on: bump base-image to version 18.0.3 - add-on: remove armhf and armv7 support diff --git a/app/src/inverter_base.py b/app/src/inverter_base.py index 47d2478..d35ddcd 100644 --- a/app/src/inverter_base.py +++ b/app/src/inverter_base.py @@ -4,6 +4,7 @@ import logging import traceback import json import gc +import socket from aiomqtt import MqttCodeError from asyncio import StreamReader, StreamWriter from ipaddress import ip_address @@ -138,7 +139,9 @@ class InverterBase(InverterIfc, Proxy): f'Connected to {addr}') asyncio.create_task(self.remote.ifc.client_loop(addr)) - except (ConnectionRefusedError, TimeoutError) as error: + except (ConnectionRefusedError, + TimeoutError, + socket.gaierror) as error: logging.info(f'{error}') except Exception: Infos.inc_counter('SW_Exception')