curl / Mailing Lists / curl-library / Single Mail

curl-library

max_fd if curl_multi_fdset() is called directly after curl_multi_add_handle()

From: Wolfgang Steinwender <wsteinwender_at_pcs.com>
Date: Wed, 8 Nov 2017 14:17:35 +0100

Documentation for curl_multi_fdset:
When libcurl returns -1 in max_fd [..]
You then need to wait a while before you proceed and call curl_multi_perform anyway. How long to
wait? We suggest 100 milliseconds at least [..]

But: If i call curl_multi_fdset() directly after curl_multi_add_handle(),
max_fd is always -1. If I wait 100ms in this case, start of the
transfer is delayed by 100ms. I don't think that is required.

In the examples I can see after curl_multi_add_handle():
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);

Is this always required after curl_multi_add_handle()?

A solution could be that curl_multi_fdset() returns
max_fd = 0 directly after curl_multi_add_handle().

Regards,
W. Steinwender
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-11-08