connection: attached transfer count

Since we no longer traverse the transfers attached to a connection,
change the sparse bitset to just a `uint32_t` counter.

This makes multi_ev the single user of sparse bitsets for transfers
using a socket and allocation failures are handled there correctly.

Refs #19818
Closes #19836
This commit is contained in:
Stefan Eissing 2025-12-04 17:15:33 +01:00 committed by Daniel Stenberg
parent 1def380032
commit d7928029fc
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 29 additions and 44 deletions

View file

@ -620,7 +620,7 @@ static void cpool_discard_conn(struct cpool *cpool,
if(CONN_INUSE(conn) && !aborted) {
CURL_TRC_M(data, "[CPOOL] not discarding #%" FMT_OFF_T
" still in use by %u transfers", conn->connection_id,
CONN_ATTACHED(conn));
conn->attached_xfers);
return;
}
@ -664,7 +664,7 @@ void Curl_conn_terminate(struct Curl_easy *data,
* are other users of it */
if(CONN_INUSE(conn) && !aborted) {
DEBUGASSERT(0); /* does this ever happen? */
DEBUGF(infof(data, "Curl_disconnect when inuse: %u", CONN_ATTACHED(conn)));
DEBUGF(infof(data, "conn terminate when inuse: %u", conn->attached_xfers));
return;
}