Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry connection to matrix server #92

Closed
nivekuil opened this issue Oct 18, 2020 · 1 comment
Closed

Retry connection to matrix server #92

nivekuil opened this issue Oct 18, 2020 · 1 comment

Comments

@nivekuil
Copy link

nivekuil commented Oct 18, 2020

The problem to solve

The matrix bot sdk seems to only try connecting to the server once, and doesn't retry, so if the bridges and synapse are started at the same time (e.g. in docker swarm, which expects applications to handle retry logic themselves) then the bridge just errors instantly from not being able to resolve the hostname, leaving it to the downstream consumer to properly handle it.

Proposed solution

I took a look and it doesn't seem like the request library this uses has a built-in way to do retries, so this probably goes along with #90. If got is chosen, that has nice facilities for handling retries: https://github.com/sindresorhus/got#retry

Alternatives

It could make sense to leave it to the downstream consumer to properly handle this stuff, but I think it would be better if this were handled upstream with the goal of keeping the matrix bot stuff as easy to use as possible. I don't think there is any real harm in retrying at least a few times for a few minutes.

@nivekuil nivekuil changed the title Retry connection Retry connection to matrix server Oct 18, 2020
@turt2live
Copy link
Owner

Duplicate of #18

@turt2live turt2live marked this as a duplicate of #18 May 30, 2022
@turt2live turt2live closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants