Skip to content

fix(conn): cap connections to minimum needed#874

Merged
hatoo merged 1 commit into
hatoo:masterfrom
tuliperis:conn
Mar 10, 2026
Merged

fix(conn): cap connections to minimum needed#874
hatoo merged 1 commit into
hatoo:masterfrom
tuliperis:conn

Conversation

@tuliperis

@tuliperis tuliperis commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #864

Instead of c = min(n, c), we take into account p: c = min(ceil(n / p), c)

Manually tested:

cargo run --features http3 -- --insecure --http-version {1.1,2,3} https://localhost/ -n 3 -q 3 -p 2

2 per protocol

image

3 per protocol

cargo run --features http3 -- --insecure --http-version {1.1,2,3} https://localhost/ -n 3 -q 3
image

1 connection

cargo run --features http3 -- --insecure --http-version 2 https://localhost/ -n 3 -c 50 -p 3
image

@hatoo hatoo merged commit 777a1c3 into hatoo:master Mar 10, 2026
23 checks passed
@hatoo

hatoo commented Mar 10, 2026

Copy link
Copy Markdown
Owner

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oha opens more connections than needed

2 participants