Skip to content

Commit 8d6cf0b

Browse files
committed
Change the window mode of yamux (#2390)
1 parent 5e93e57 commit 8d6cf0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

beacon_node/eth2_libp2p/src/service.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,17 @@ fn build_transport(
375375
mplex_config.set_max_buffer_size(256);
376376
mplex_config.set_max_buffer_behaviour(libp2p::mplex::MaxBufferBehaviour::Block);
377377

378+
// yamux config
379+
let mut yamux_config = libp2p::yamux::YamuxConfig::default();
380+
yamux_config.set_window_update_mode(libp2p::yamux::WindowUpdateMode::on_read());
381+
378382
// Authentication
379383
Ok((
380384
transport
381385
.upgrade(core::upgrade::Version::V1)
382386
.authenticate(generate_noise_config(&local_private_key))
383387
.multiplex(core::upgrade::SelectUpgrade::new(
384-
libp2p::yamux::YamuxConfig::default(),
388+
yamux_config,
385389
mplex_config,
386390
))
387391
.timeout(Duration::from_secs(10))

0 commit comments

Comments
 (0)