curl / Mailing Lists / curl-library / Single Mail
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

From: Daniel Stenberg via curl-library <>
Date: Wed, 26 Jan 2022 09:20:40 +0100 (CET)

On Tue, 25 Jan 2022, Silas via curl-library wrote:

> I'm using multi interface to keep different connections (not more than 3),
> polling it for updates. But, whenever my local IP address change (and also
> the routing table), I keep receiving CURLE_OPERATION_TIMEDOUT (28), even
> though connection to the rest of the network is fully restablished after IP
> and route changing. Removing it (with curl_multi_remove_handle()) and
> cleaning it up (with curl_easy_cleanup()) is not enough: the only way to
> make it work again is to destroy my multi handler (with
> curl_multi_cleanup()) and creating it again (with curl_multi_init()).

This smells like something is wrongly used from a cache when it shouldn't, but
I can't figure out what.

If you enable CURLOPT_VERBOSE for the attempt after the network change, does
it reveal any details of what exactly it is that fails and thus make libcurl
time out?

> I can provide you with a small C program and a 2 line shell script (to
> change network configuration in a NetBSD or Linux box) to reproduce this
> behaviour, if you want.

Plese do. And tell us what libcurl version you're using for this.

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2022-01-26