This commit is contained in:
GroovieGermanikus 2023-10-09 18:00:23 +02:00
parent 617f7511ce
commit 83f9bdf9e0
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 2 additions and 8 deletions

View File

@ -239,19 +239,13 @@ pub fn connection_stats(connection: &Connection) -> String {
/// see https://github.com/quinn-rs/quinn/pull/1671
/// note: true means that quinn's heuristic for GSO detection is used to decide if it gets enabled
pub fn apply_gso_workaround(tc: &mut TransportConfig) {
let disable_gso = disable_gso();
if disable_gso {
if disable_gso() {
tc.enable_segmentation_offload(false);
}
}
pub fn log_gso_workaround() {
let disable_gso = std::env::var("DISABLE_GSO")
.unwrap_or("false".to_string())
.parse::<bool>()
.expect("flag must be true or false");
info!("GSO force-disabled? {}", disable_gso);
info!("GSO force-disabled? {}", disable_gso());
}
fn disable_gso() -> bool {