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

feat: retry connection attempts for new connections too #296

Merged
merged 7 commits into from
Jul 28, 2021

Conversation

joshuef
Copy link
Contributor

@joshuef joshuef commented Jul 28, 2021

No description provided.

@joshuef joshuef requested a review from a team as a code owner July 28, 2021 09:51
src/endpoint.rs Outdated Show resolved Hide resolved
src/endpoint.rs Outdated Show resolved Hide resolved
src/endpoint.rs Outdated Show resolved Hide resolved
src/error.rs Outdated Show resolved Hide resolved
connec
connec previously approved these changes Jul 28, 2021
Copy link
Contributor

@connec connec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joshuef joshuef enabled auto-merge (rebase) July 28, 2021 14:20
Chris Connelly added 3 commits July 28, 2021 16:46
We need to debug why this test is taking so long, and there's no reason
not to enable the logs, particularly since they're enabled for every
other test.
This is how the `backoff` crate supports limiting how long we back off
for. The default is 15 mins (!) which is crazy long for our purposes.

The configuration is exposed via the `Config` struct under
`retry_duration_msec`. The default is 30s, which is completely arbitrary
but reasonable-sounding. Retry logic was refactored into a method to
make it easier to use the configuration.
Even the default 30s is quite long for tests, so it's been reduced to a
trivial time (500ms). Sadly, tests with connection failures still take a
long time to run, since that timeout is configured elsewhere (and I
couldn't find out where – possibly it's an OS setting).
@joshuef joshuef merged commit 8a32580 into maidsafe:master Jul 28, 2021
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

Successfully merging this pull request may close these issues.

2 participants