mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-01-15 23:55:57 +00:00
try reconnections on LocalProtocolError, fix #135
This commit is contained in:
parent
9deea93d43
commit
7109681d99
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user