cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: win32: running_handles == 0 ?

From: Yet Another Geek <yetanothergeek_at_yahoo.com>
Date: Tue, 3 Dec 2002 04:23:56 -0800 (PST)

On Sat, 30 Nov 2002, Yet Another Geek wrote:

> > try running on Windows, the app gets caught in
> > the loop - running_handles never reaches zero.

> Perhaps it helps if you could rewrite the program
> using the plain C interface and post it here,
> so that we all can try it out and possibly detect
> an error.

I tested this one:
  curlpas-7.10.2/docs/examples/multi-double.c
and I have the same problem with it.

> A general advice would be to always make sure to
> call curl_multi_perform() again if it returns
> CURLM_CALL_MULTI_PERFORM, and not select() until
> it no longer returns that.

YES!!! That solves the problem.

The examples don't do this ...

diff -u old/multi-double.c new/multi-double.c
--- old/multi-double.c Tue Dec 3 05:47:04 2002
+++ new/multi-double.c Tue Dec 3 05:51:58 2002
@@ -80,7 +80,8 @@
     case 0:
     default:
       /* timeout or readable/writable sockets */
- curl_multi_perform(multi_handle,
&still_running);
+ while(CURLM_CALL_MULTI_PERFORM ==
+ curl_multi_perform(multi_handle,
&still_running));
       break;
     }
   }

Thanks for the help!

- Jeff

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
Received on 2002-12-03