mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-04-09 11:25:40 +00:00
try reconnections on LocalProtocolError, fix #132
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user