Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: libcurl multi timeout after IP or routing table changes
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 27 Jan 2022 08:20:31 +0100 (CET)
On Wed, 26 Jan 2022, Silas via curl-library wrote:
> I just discovered I can only reproduce this behaviour when using HTTPS.
> Maybe a openssl thing? The same program using plain HTTP can get through
> network changes.
I don't think it's related to TLS. If it was, you should be able to repro
using HTTPS using HTTP/1.1 as well. I rather suspect it is about HTTP/2 and
that each transfer is a stream inside a connection, so a failed transfer only
kills that stream and not the connection.
When you spot the problem with HTTP/2. Are the three transfers to the same
host? Are they perhaps even using the same connection?
lib/url.c:extract_if_dead() is meant to detect "dead" connections.
> Should it use the existing connection if I'm calling curl_easy_cleanup()?
You mean you called cleanup on the *the previous* transfer and now you get
that same connection reused? That's expected, since for the multi interface,
the connection pool is held in the multi handle.
Date: Thu, 27 Jan 2022 08:20:31 +0100 (CET)
On Wed, 26 Jan 2022, Silas via curl-library wrote:
> I just discovered I can only reproduce this behaviour when using HTTPS.
> Maybe a openssl thing? The same program using plain HTTP can get through
> network changes.
I don't think it's related to TLS. If it was, you should be able to repro
using HTTPS using HTTP/1.1 as well. I rather suspect it is about HTTP/2 and
that each transfer is a stream inside a connection, so a failed transfer only
kills that stream and not the connection.
When you spot the problem with HTTP/2. Are the three transfers to the same
host? Are they perhaps even using the same connection?
lib/url.c:extract_if_dead() is meant to detect "dead" connections.
> Should it use the existing connection if I'm calling curl_easy_cleanup()?
You mean you called cleanup on the *the previous* transfer and now you get
that same connection reused? That's expected, since for the multi interface,
the connection pool is held in the multi handle.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://curl.se/support.html -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2022-01-27