← Commit list

fe2d3591c3

Stefan Eissing
Stefan Eissing
2026-08-28
SUCCESS Duration: 416s

Subject

share unlink: forget connection

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/curl_share.c+7 -3
@@ -421,9 +421,13 @@ CURLcode Curl_share_easy_unlink(struct Curl_easy *data)
if(share) {
bool locked = share_lock_acquire(share, data);
- /* If data has a connection from this share, detach it. */
- if(data->conn && (share->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
- Curl_detach_connection(data);
+ /* If share caches connections, detach any existing connection and
+ * forget its identifier. */
+ if((share->specifier & (1 << CURL_LOCK_DATA_CONNECT))) {
+ if(data->conn)
+ Curl_detach_connection(data);
+ data->state.lastconnect_id = -1;
+ }
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
if(share->cookies == data->cookies)