diff --git a/matrix_webhook/utils.py b/matrix_webhook/utils.py index 780b710..72172a7 100644 --- a/matrix_webhook/utils.py +++ b/matrix_webhook/utils.py @@ -90,5 +90,8 @@ async def send_room_message(room_id, content): except LocalProtocolError as e: msg = f"Send error: {e}" LOGGER.error(msg) + LOGGER.warning("Reconnecting") + if conf.MATRIX_PW: + await CLIENT.login(conf.MATRIX_PW) LOGGER.warning("Trying again") return create_json_response(HTTPStatus.GATEWAY_TIMEOUT, "Homeserver not responding")