cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLM_CALL_MULTI_PERFORM and curl_multi_socket

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 31 May 2008 19:57:24 +0200 (CEST)

On Sat, 31 May 2008, Nathan E. Moore wrote:

> 1) Run hiperfifo.c
> 2) Pipe in lots of urls. I've been using 20 every 2 seconds
> 3) hiperfifo.c quits with "ERROR: event_cb: curl_multi_socket returns
> CURLM_BAD_SOCKET"

Using 7.18.1 I presume?

The curl_multi_socket() API is a bit broken in this version and I've done
numerous fixes in that for the upcoming release. It would be very good if you
could try your same code with the most recent CVS/snapshot and see if you get
any of these problems still.

I used to get the CURLM_BAD_SOCKET problem as well, and in my case it actually
turned out to be that libevent could report action on the socket even though I
just previously told it I wasn't interested in that socket anymore. That, and
how CURLM_CALL_MULTI_PERFORM works/is documented, made me change the
curl_multi_socket*() functions to now just ignore "unknown" file descriptors
passed in.

-- 
  / daniel.haxx.se
Received on 2008-05-31