fix(peer): preserve control capacity across origins
Set the per-origin control-stream share to eight against the sixteen-slot global pool, preventing one observed host from occupying every decoded control task. Test Plan: - just test - just clippy - exact admission-limit regression - git diff --check
This commit is contained in:
@@ -52,7 +52,7 @@ const MAX_GLOBAL_STREAM_INSTALL_TASKS: usize = 2;
|
||||
/// One observed host may retain only this many established connection scopes.
|
||||
const MAX_ESTABLISHED_CONNECTIONS_PER_ORIGIN: usize = 8;
|
||||
/// Bounds decoded and undecoded control work across every connection from one IP.
|
||||
const MAX_CONTROL_STREAM_TASKS_PER_ORIGIN: usize = 16;
|
||||
const MAX_CONTROL_STREAM_TASKS_PER_ORIGIN: usize = 8;
|
||||
/// Preserves bulk capacity for other LAN origins while allowing two full
|
||||
/// four-stream ordinary download windows from one host.
|
||||
const MAX_BULK_TRANSFER_TASKS_PER_ORIGIN: usize = 8;
|
||||
@@ -717,7 +717,7 @@ mod tests {
|
||||
assert_eq!(MAX_GLOBAL_BULK_TRANSFER_TASKS, 48);
|
||||
assert_eq!(MAX_GLOBAL_STREAM_INSTALL_TASKS, 2);
|
||||
assert_eq!(MAX_ESTABLISHED_CONNECTIONS_PER_ORIGIN, 8);
|
||||
assert_eq!(MAX_CONTROL_STREAM_TASKS_PER_ORIGIN, 16);
|
||||
assert_eq!(MAX_CONTROL_STREAM_TASKS_PER_ORIGIN, 8);
|
||||
assert_eq!(MAX_BULK_TRANSFER_TASKS_PER_ORIGIN, 8);
|
||||
assert_eq!(MAX_STREAM_INSTALL_TASKS_PER_ORIGIN, 1);
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user