cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLE_GOT_NOTHING on slow connections

From: Joe Halpin <j.p.h_at_comcast.net>
Date: Fri, 27 Feb 2004 12:30:06 -0600

Richard Bramante wrote:
> Well,
>
> After a little more probing it looks like this will be a Windows-only
> problem.
>
> First, connect() fails as expected but the error return is an
> EWOULDBLOCK, which I found a bit suprising since the connection had been
> RST, but ok, there is still time to recover.
>
>
> Curl then calls waitconnect() and select() returns 1, *but* it does not
> set this socket in the errfd set, so curl assumes that it is connected
> and waitconnect returns 0.

I don't recall ever using a system in which the errfd set was used for
this. POSIX, in fact, specifies that for a socket, this set will report
pending exceptional conditions, not errors. The only exceptional
condition I know of for TCP sockets is out-of-band data.

Perhaps Windows does this differently, I wouldn't be surprised, but I
don't think this is a reliable way to detect an error in general.

Joe
Received on 2004-02-27