Skip to content

Commit

Permalink
fix(iroh): Do not set low max streams in builder (#2593)
Browse files Browse the repository at this point in the history
## Description

This removes the max streams in the builder.  This makes little sense
when users are allowed to create their custom protocol.

right now both uni and bidirectional streams default to 100 max, which
is reasonable for now.  We should allow fully customising the
TransportConfig later.

## Breaking Changes

I don't think this counts as a breaking change.  If we want to lower
one of these later it would be, but we're probably fine with 100 by
default?

## Notes & open questions

See #2592

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [x] All breaking changes documented.
  • Loading branch information
flub authored Aug 5, 2024
1 parent bdc1c45 commit 215cd1d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions iroh/src/node/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const ENDPOINT_WAIT: Duration = Duration::from_secs(5);
const DEFAULT_GC_INTERVAL: Duration = Duration::from_secs(60 * 5);

const MAX_CONNECTIONS: u32 = 1024;
const MAX_STREAMS: u64 = 10;

/// Storage backend for documents.
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -458,11 +457,6 @@ where
..Default::default()
});
let (endpoint, nodes_data_path) = {
let mut transport_config = quinn::TransportConfig::default();
transport_config
.max_concurrent_bidi_streams(MAX_STREAMS.try_into()?)
.max_concurrent_uni_streams(0u32.into());

let discovery: Option<Box<dyn Discovery>> = match self.node_discovery {
DiscoveryConfig::None => None,
DiscoveryConfig::Custom(discovery) => Some(discovery),
Expand Down Expand Up @@ -501,7 +495,6 @@ where
.secret_key(self.secret_key.clone())
.proxy_from_env()
.keylog(self.keylog)
.transport_config(transport_config)
.concurrent_connections(MAX_CONNECTIONS)
.relay_mode(self.relay_mode);
let endpoint = match discovery {
Expand Down

0 comments on commit 215cd1d

Please sign in to comment.