diff --git a/streamer/src/nonblocking/quic.rs b/streamer/src/nonblocking/quic.rs index ba567a7f3123fb..67fa42e2d70399 100644 --- a/streamer/src/nonblocking/quic.rs +++ b/streamer/src/nonblocking/quic.rs @@ -335,18 +335,12 @@ fn handle_and_cache_new_connection( params.total_stake, ) as u64) { - connection.set_max_concurrent_uni_streams(max_uni_streams); let receive_window = compute_recieve_window( params.max_stake, params.min_stake, connection_table_l.peer_type, params.stake, ); - - if let Ok(receive_window) = receive_window { - connection.set_receive_window(receive_window); - } - let remote_addr = connection.remote_address(); debug!( @@ -369,6 +363,12 @@ fn handle_and_cache_new_connection( ) { let peer_type = connection_table_l.peer_type; drop(connection_table_l); + + if let Ok(receive_window) = receive_window { + connection.set_receive_window(receive_window); + } + connection.set_max_concurrent_uni_streams(max_uni_streams); + tokio::spawn(handle_connection( connection, remote_addr,