mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-04-09 11:25:40 +00:00
Merge pull request #135 from nim65s/reconnect
try reconnections on LocalProtocolError, fix #135
This commit is contained in:
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
by [@timo-schluessler](https://github.com/timo-schluessler)
|
by [@timo-schluessler](https://github.com/timo-schluessler)
|
||||||
- replace black & isort by ruff
|
- replace black & isort by ruff
|
||||||
- update dependencies
|
- update dependencies
|
||||||
|
- try to reconnect on LocalProtocolError
|
||||||
- add mwe gitlab webhook formatter. Intergrations are better for now
|
- add mwe gitlab webhook formatter. Intergrations are better for now
|
||||||
|
|
||||||
## [v3.8.0] - 2023-04-08
|
## [v3.8.0] - 2023-04-08
|
||||||
|
|||||||
@@ -90,5 +90,8 @@ async def send_room_message(room_id, content):
|
|||||||
except LocalProtocolError as e:
|
except LocalProtocolError as e:
|
||||||
msg = f"Send error: {e}"
|
msg = f"Send error: {e}"
|
||||||
LOGGER.error(msg)
|
LOGGER.error(msg)
|
||||||
|
LOGGER.warning("Reconnecting")
|
||||||
|
if conf.MATRIX_PW:
|
||||||
|
await CLIENT.login(conf.MATRIX_PW)
|
||||||
LOGGER.warning("Trying again")
|
LOGGER.warning("Trying again")
|
||||||
return create_json_response(HTTPStatus.GATEWAY_TIMEOUT, "Homeserver not responding")
|
return create_json_response(HTTPStatus.GATEWAY_TIMEOUT, "Homeserver not responding")
|
||||||
|
|||||||
Reference in New Issue
Block a user