Skip to content

Commit

Permalink
v1.17: corrected to not use hardcoded connections count for unstaked …
Browse files Browse the repository at this point in the history
…(backport of #633) (#762)

* corrected to not use hardcoded connections count for unstaked (#633)

Co-authored-by: Lijun Wang <[email protected]>
  • Loading branch information
2 people authored and yihau committed May 7, 2024
1 parent 7a511bd commit 3a66644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streamer/src/nonblocking/quic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use {
crate::{
quic::{configure_server, QuicServerError, StreamStats, MAX_UNSTAKED_CONNECTIONS},
quic::{configure_server, QuicServerError, StreamStats},
streamer::StakedNodes,
tls_certificates::get_pubkey_from_tls_certificate,
},
Expand Down Expand Up @@ -748,7 +748,7 @@ fn max_streams_for_connection_in_100ms(
} else {
Percentage::from(MAX_UNSTAKED_STREAMS_PERCENT)
.apply_to(max_streams_per_interval)
.saturating_div(MAX_UNSTAKED_CONNECTIONS as u64)
.saturating_div(max_unstaked_connections as u64)
};

let min_staked_streams_per_100ms = if max_unstaked_connections == 0 {
Expand Down

0 comments on commit 3a66644

Please sign in to comment.