mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-01-16 08:05:57 +00:00
try reconnections on LocalProtocolError, fix #132
This commit is contained in:
parent
3325a63909
commit
9deea93d43
@ -59,6 +59,9 @@ async def join_room(room_id):
|
||||
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