curl / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 9 Nov 2017 00:48:41 +0100 (CET)

On Wed, 8 Nov 2017, Wolfgang Steinwender wrote:

> curl_multi_timeout() says maximum 0ms, curl_multi_fdset() at least 100ms.

curl_multi_fdset() suggests 100ms if you have no socket - and no timeout.

> A valid value from curl_multi_timeout() *always* takes precedence over
> max_fd = -1 or only immediatly after curl_multi_add_handle()?

If you have no socket to wait for, you should still wait a while since
otherwise you would busyloop like crazy. How long while should you wait? You
should *never* wait longer than curl_multi_timeout() asks you, socket or not.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-11-09