Skip to content

Commit

Permalink
networking: Disable path MTU discovery for quic.
Browse files Browse the repository at this point in the history
  • Loading branch information
shamil-gadelshin committed Nov 3, 2023
1 parent c9a15f3 commit c0bb729
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 28 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/subspace-networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ unsigned-varint = { version = "0.7.1", features = ["futures", "asynchronous_code
void = "1.0.2"

[dependencies.libp2p]
version = "0.52.3"
git = "https://github.com/subspace/rust-libp2p"
rev = "7a9328fc0a5f9e28575192d5f4f8663fde6752af"
default-features = false
features = [
"autonat",
Expand All @@ -72,4 +73,4 @@ features = [

[dev-dependencies]
rand = "0.8.5"
libp2p-swarm-test = { git = "https://github.com/shamil-gadelshin/rust-libp2p", rev = "7a9328fc0a5f9e28575192d5f4f8663fde6752af" }
libp2p-swarm-test = { git = "https://github.com/subspace/rust-libp2p", rev = "7a9328fc0a5f9e28575192d5f4f8663fde6752af" }
7 changes: 6 additions & 1 deletion crates/subspace-networking/src/constructor/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ pub(super) fn build_transport(
.boxed()
};

let quic = QuicTransport::new(QuicConfig::new(keypair))
#[cfg(not(windows))]
let quic_config = QuicConfig::new(keypair);
#[cfg(windows)]
let quic_config = QuicConfig::new(keypair).path_mtu_discovery_config(None);

let quic = QuicTransport::new(quic_config)
.map(|(peer_id, muxer), _| (peer_id, StreamMuxerBox::new(muxer)));

let wrapped_quic =
Expand Down

0 comments on commit c0bb729

Please sign in to comment.