Skip to content

Commit

Permalink
quic: don't call connection.set_max_concurrent_uni_streams if we're g…
Browse files Browse the repository at this point in the history
…oing to drop a connection

Avoids taking a mutex and waking a task.
  • Loading branch information
alessandrod committed Apr 19, 2024
1 parent f0e87f6 commit 01c457a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion streamer/src/nonblocking/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ 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, params.peer_type);

Expand Down Expand Up @@ -377,6 +376,7 @@ fn handle_and_cache_new_connection(
)
{
drop(connection_table_l);
connection.set_max_concurrent_uni_streams(max_uni_streams);
tokio::spawn(handle_connection(
connection,
remote_addr,
Expand Down

0 comments on commit 01c457a

Please sign in to comment.