Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: use configured fetch timeout
Quaylyn Rimer committed 3 months ago
commit 57988f0f7655595f93ecf91fb2a3f40243ae2989
parent b241f0cbdce8f1f86dedfe05044eec6aec8f289f
1 file changed +2 -2
modified crates/radicle-node/src/wire.rs
@@ -35,7 +35,6 @@ use crate::reactor::{NoiseSession, ProtocolArtifact, SessionEvent, Socks5Session
use crate::reactor::{Token, Tokens};
use crate::service;
use crate::service::io::Io;
-
use crate::service::FETCH_TIMEOUT;
use crate::service::{session, DisconnectReason, Metrics, Service};
use crate::worker;
use crate::worker::{ChannelEvent, ChannelsConfig};
@@ -722,9 +721,10 @@ where
                                metrics.streams_opened += 1;
                                metrics.received_fetch_requests += 1;
                                let reader_limit = self.service.config().limits.fetch_pack_receive;
+
                                let timeout = self.service.fetch_timeout();
                                let Some(channels) = streams.register(
                                    stream,
-
                                    ChannelsConfig::new(FETCH_TIMEOUT)
+
                                    ChannelsConfig::new(timeout)
                                        .with_reader_limit(reader_limit),
                                ) else {
                                    log::debug!(target: "wire", "Peer attempted to open already-open stream stream {stream}");