On Tue, 7 Dec 2010, David Woodhouse wrote:

Yes, the problem still happens. I've made a simpler test case out of the code in PacRunner: http://david.woodhou.se/gcurl.c

I found a little mistake in your code that really makes a difference when adjusted: when your timer expires and you tell libcurl about it, use curl_multi_socket_action() and not curl_multi_socket_all(). I adjusted your test code like this:

--- gcurl.c-orig        2010-12-08 12:41:21.000000000 +0100
+++ gcurl.c     2010-12-08 12:38:38.000000000 +0100
@@ -154,7 +154,8 @@

        DBG("");

-       result = curl_multi_socket_all(multi, &handles);
+       result = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0,
+                                          &handles);

        check_sockets(multi, result, handles);

I think perhaps curl_multi_socket_all() could be adjusted to work better in this case, but the funtion is really not recommended for use anyway any longer so I rather just not touch it...

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to