From: Daniel Stenberg Date: Wed, 02 Nov 2011 22:40:49 GMT Subject: Re: [PATCH 1/2] http.c: Use curl_multi_fdset to select on curl fds instead of just sleeping Message-ID: In-Reply-To: On Wed, 2 Nov 2011, Mika Fischer wrote: > The only problem I can see is that curl_multi_fdset is not guaranteed to > return any fds. So in theory it could be possible that we don't get fds, but > we're actually reading stuff. In this case things would get slow, because we > would sleep for 50ms after every read... > > However, I don't know if this is a case that actually comes up in the real > world. Maybe Daniel has some advice on this. It doesn't really happen so it should be safe. The case where no fds are returned is when libcurl cannot return a socket to wait for during name resolving (if your particular libcurl is built to use such a resolver backend - libcurl has several different ones). And during name resolving there won't be any data to read for the libcurl-app anyway. -- / daniel.haxx.se