cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Timeout of 0 in url.c: SocketIsDead()

From: Eoin ó Fearghail <eoin.o.fearghail_at_gmail.com>
Date: Wed, 11 May 2011 19:06:08 +0100

On Wed, May 11, 2011 at 6:47 PM, Kamil Dudka <kdudka_at_redhat.com> wrote:
> On Wednesday 11 May 2011 19:37:45 Eoin ó Fearghail wrote:
>> However this section will only break out of the do... while loop
>> if a non-zero value has been set for timeout_ms
>> https://github.com/bagder/curl/blob/master/lib/select.c#L292
>
> I do not get it.  Are you observing any real problem with SocketIsDead()?
>
> Kamil

What I saw was select returning -1, and SOCKERRNO returning 0,
so the code looped forever.

But ultimately what I was wondering was whether there was a reason
not to pass in a timeout to make sure the code always popped out of the
loop. There may be a conflict in the same arg timeout_ms being passed to
select to indicate no blocking, and the timeout used in the function itself
where 0 means never timeout..

Anyway it's not a major problem.

Eoin.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-11