h2: bootstrap max streams from multi handle if in use

Closes #22418
This commit is contained in:
CatboxParadox 2026-07-28 14:12:09 +02:00 committed by Daniel Stenberg
parent f76f79696e
commit c7b1e10dc1
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -2412,7 +2412,9 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
failf(data, "Could not initialize nghttp2");
goto out;
}
ctx->max_concurrent_streams = DEFAULT_MAX_CONCURRENT_STREAMS;
ctx->max_concurrent_streams = data->multi ?
Curl_multi_max_concurrent_streams(data->multi) :
DEFAULT_MAX_CONCURRENT_STREAMS;
if(ctx->via_h1_upgrade) {
/* HTTP/1.1 Upgrade issued. H2 Settings have already been submitted