From 20148d356a379f7e65b3ea5ec9001b7768ec838d Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 5 Aug 2024 22:09:57 +0200 Subject: [PATCH] fix(iroh): Do not set low max streams in builder 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. --- iroh/src/node/builder.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/iroh/src/node/builder.rs b/iroh/src/node/builder.rs index 456bf44d5a..3ea3330fd8 100644 --- a/iroh/src/node/builder.rs +++ b/iroh/src/node/builder.rs @@ -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)] @@ -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> = match self.node_discovery { DiscoveryConfig::None => None, DiscoveryConfig::Custom(discovery) => Some(discovery), @@ -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 {