Skip to content

Commit

Permalink
More tolerant congestion control
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtian authored and arun-koshy committed Mar 21, 2024
1 parent 26d415e commit 8898bcd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/anemo/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
PeerId, Result,
};
use pkcs8::EncodePrivateKey;
use quinn::VarInt;
use quinn::{congestion, VarInt};
use rcgen::{CertificateParams, KeyPair, SignatureAlgorithm};
use serde::{Deserialize, Serialize};
use std::{sync::Arc, time::Duration};
Expand Down Expand Up @@ -342,6 +342,12 @@ impl QuicConfig {
config.keep_alive_interval(Some(keep_alive_interval));
}

let mut cc_config = congestion::NewRenoConfig::default();
cc_config.loss_reduction_factor(0.7);
cc_config.initial_window(4 << 20);
cc_config.minimum_window(1 << 20);
config.congestion_controller_factory(Arc::new(cc_config));

config
}
}
Expand Down

0 comments on commit 8898bcd

Please sign in to comment.