cURL / Mailing Lists / curl-library / Single Mail

curl-library

multi_socket race conditions?

From: Michael Wallner <mike_at_iworks.at>
Date: Fri, 11 May 2007 00:25:19 +0200

Hi!

I know you're surely not bored at all, unless you're bored with me ;)
It seems like I came across another edge case with the multi_socket API,
namely pre-mature end prior finishing all transfers. I even get
CURLM_BAD_SOCKET back from curl_multi_socket sometimes.

Attached program should prove what I'm talking about.

$ touch /var/www/empty.html
$ perl -p -i -e 's/honeybadger/localhost/' load.c
$ gcc -g -levent `curl-config --cflags --libs` -o load load.c
$ ./load 2>/dev/null # STDERR gives some output

Should print "Added: 1000, Finished: 1000, Time: XXXms", which it
does when I request a 100k file but (most of the time) not so
if I request an empty file.

-- 
Michael

  • text/x-csrc attachment: load.c
Received on 2007-05-11