cURL / Mailing Lists / curl-users / Single Mail


Re: curl_multi_fdset setting maxfd to -1

From: Daniel Stenberg <>
Date: Wed, 8 Sep 2010 23:58:16 +0200 (CEST)

On Wed, 8 Sep 2010, Arunkumar Manickam wrote:

> I am using curl_multi interface to do HTTPS transaction using openssl.

Then please use the curl-library mailing list for questions and issues with

> When curl_multi_fdset returns CURLM_OK but sets max_fd to -1, should it be
> considered as a fatal error and the download be stopped ?

When that happens, libcurl has no socket to wait on so it can't return any.

> or simply call curl_multi_fdset again after a delay ?

You should consider no socket as there's no socket for wait for, but in order
to not busy-loop you need to wait at least a short while anyway before you
proceed. A short sleep is suitable in that case.

List admin:
Received on 2010-09-08