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

refactor(relay): keep connection alive while we are using it #4696

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

thomaseizinger
Copy link
Contributor

Description

Previously, the relay client was applying a 10 second timeout to idle connections. Instead, we now compute the connection keep alive based on whether we are still using the connection.

This makes all tests pass apart from 1: reuse_connection. This makes sense as that connection is immediately idle once dialed. To make that test pass, we configure a global idle connection timeout of 1 second.

In a real-world scenario, reusing a connection only applies if the connection is still alive due to other protocols being active.

Related: #3844.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@thomaseizinger thomaseizinger added send-it trivial Marks PRs which are considered trivial and don't need approval from another maintainer. labels Oct 20, 2023
@mergify mergify bot merged commit b709a40 into master Oct 20, 2023
@mergify mergify bot deleted the feat/relay-client-no-keepalive branch October 20, 2023 07:31
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
send-it trivial Marks PRs which are considered trivial and don't need approval from another maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants