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(SwarmBuilder): add with_connection_timeout method #5575

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stormshield-frb
Copy link
Contributor

Description

Small PR to be able to change the connection_timeout value given to the TransportTimeout when building the Swarm with a SwarmBuilder.

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

@stormshield-frb stormshield-frb force-pushed the feat/add-connection-timeout-to-swarm-builder branch from df78e2c to f78ea9d Compare August 28, 2024 15:28
@stormshield-frb stormshield-frb force-pushed the feat/add-connection-timeout-to-swarm-builder branch from f78ea9d to 1300365 Compare August 28, 2024 15:30
libp2p/CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines +17 to +18
#[allow(unused)] // used in `../swarm.rs` but due to feature flag combinations, clippy gives an unnecessary warning.
pub(crate) const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(10);
Copy link
Contributor

Choose a reason for hiding this comment

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

the old constant was used in this same file, but it isn't anymore. I think it would be clearer to move it to ../swarm.rs where most items have similar allow annotations and where the new constant is actually used, thus removing the need to comment about a different file

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.

3 participants