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: Curl Multi with easy handle timeout

From: herhor67 via curl-library <curl-library_at_lists.haxx.se>
Date: Fri, 28 Apr 2023 22:27:36 +0200

I will post a thinned out part of the code in an attachment - hopefully it will be available. If this is not too much to ask - I would be greatly grateful :) Its purpose is to run N connections every second - the external API is rate-limited. From what I've seen, usually my counter `(sent-received)` is either equal or very close to `still_alive`. However, on rare occasions, my counter maxes out (equal to `MAX_CONN`) and LibCURL reports 0 running handles. Then it stays like that indefinitely. Temat: Re: Curl Multi with easy handle timeoutData: 2023-04-28 17:10Nadawca: "Daniel Stenberg" &lt;daniel_at_haxx.se&gt;Adresat: "herhor67" &lt;herhor67_at_interia.pl&gt;; DW: "herhor67 via curl-library" &lt;curl-library_at_lists.haxx.se&gt;; &gt; On Fri, 28 Apr 2023, herhor67 wrote:
&gt;
&gt; &gt; it seems that I must have some kind of logic error in my
application.
&gt;
&gt; Make sure you check the return code from all libcurl calls to detect
if it
&gt; returns an error somewhere.
&gt;
&gt; &gt; Does a handle with timeout have some different message/status?
&gt;
&gt; When a timeout triggers, the transfer stops and it returns with an
error. Then
&gt; that transfer will be "delivered" as complete just like any other
transfer
&gt; that completes.
&gt;
&gt; &gt; There seems to only be "CURLMSG_DONE" but maybe somehing in the
`CURLcode
&gt; &gt; result` field?
&gt;
&gt; Yes, result holds a non-zero value for failures.
&gt;
&gt; --
&gt;
&gt; / daniel.haxx.se
&gt; | Commercial curl support up to 24x7 is available!
&gt; | Private help, bug fixes, support, ports, new features
&gt; | https://curl.se/support.html
&gt;

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-04-28