← Commit list

72766ecf8a

Stefan Eissing
Stefan Eissing
2026-08-27
SUCCESS Duration: 398s

Subject

connection reuse: age check

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/url.c+10 -0
@@ -1095,6 +1095,16 @@ static bool url_match_conn(struct connectdata *conn, void *userdata)
if(!url_match_multiplex_limits(conn, m))
return FALSE;
+ if(m->data->set.conn_max_age_ms > 0) {
+ timediff_t age_ms = curlx_ptimediff_ms(&m->now, &conn->created);
+ if(age_ms > m->data->set.conn_max_age_ms) {
+ /* Transfer is looking for a younger connection. */
+ if(!CONN_INUSE(conn))
+ Curl_conn_close(m->data, conn, FALSE);
+ return FALSE;
+ }
+ }
+
/* If we are going to pick an idle connection, do an extra
* health check before we reuse it. */
if(!CONN_INUSE(conn) &&