cURL / Mailing Lists / curl-library / Single Mail


Re: Libcurl Connection Lifetime

From: Daniel Stenberg <>
Date: Sun, 16 Oct 2016 17:25:32 +0200 (CEST)

On Tue, 11 Oct 2016, Ranjan Khanna wrote:

> Does libcurl has any API that sets the persistent connection expiry time?

Nope, nothing like that unfortunately.

> Basically, what I want is that libcurl should expire/close an already
> establishes connection after x minutes and then re-establishes the
> connection itself.

libcurl only establishes connections when you ask for a transfer and there's
no already established one in the pool to reuse. It never establishes any
ahead of time.

But we've discussed similar ideas before and "Offer API to flush the
connection pool" is already in the TODO:

as well as "Monitor connections in the connection pool":

and "Timeout idle connections from the pool":

So we can clearly say that there are a lot of ideas on how to improve the
connection caching and the API/controls for that. We mostly lack someone
actually working on that..


List admin:
Received on 2016-10-16