conncache: apply multi limits to transfers using a shared pool

- Determine max host and total connection limits from the transfer's own
  multi handle and test that it works for shared connections.

Prior to this change, since df67269 (precedes 8.13.0),
Curl_cpool_check_limits() took the limits from the multi handle that
owns the pool. A share-owned pool is not owned by any multi, so the
limit check always passed.

Prior to df67269 the limits came from the transfer's own multi handle.

Fixes https://github.com/curl/curl/issues/22265
Closes https://github.com/curl/curl/pull/22266
This commit is contained in:
Graham Campbell 2026-07-04 20:45:31 +01:00 committed by Jay Satiro
parent 6bad3db3d5
commit 02214d98f7
5 changed files with 51 additions and 23 deletions

View file

@ -79,6 +79,11 @@ in different threads using a shared connection.
Note that when you use the multi interface, all easy handles added to the same
multi handle share the connection cache by default without using this option.
Connection limits set with CURLMOPT_MAX_HOST_CONNECTIONS(3) and
CURLMOPT_MAX_TOTAL_CONNECTIONS(3) also apply to transfers using a shared
connection cache. Each transfer applies the limits of the multi handle it
runs on to the shared cache.
## CURL_LOCK_DATA_PSL
The Public Suffix List stored in the share object is made available to all