libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 7bf6af91463cd9f514ef98f87726cb6701af2245
parent 44bbd99901f6c70c8c4e498380de738cc5ada34d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  6 Dec 2007 22:29:15 +0000

better

Diffstat:
Msrc/daemon/daemontest_post_loop.c | 13++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/daemon/daemontest_post_loop.c b/src/daemon/daemontest_post_loop.c @@ -298,7 +298,7 @@ testExternalPost () FD_ZERO (&rs); FD_ZERO (&ws); FD_ZERO (&es); - curl_multi_perform (multi, &running); + while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform (multi, &running)); mret = curl_multi_fdset (multi, &rs, &ws, &es, &max); if (mret != CURLM_OK) { @@ -322,19 +322,10 @@ testExternalPost () (ctimeout < timeout) && (ctimeout >= 0) ) timeout = ctimeout; - if (timeout > 0) - timeout = 0; /* this line is needed since CURL seems to have - a bug -- it returns a timeout of -1 even though - it should be attempting to connect -- and the - socket for doing the connection is not yet - in the write-set! If the timeout is too high, - no progress would happen! Even a timeout of - 1 would cause my system to be mostly idle instead - of processing at maximum speed... */ tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; select (max + 1, &rs, &ws, &es, &tv); - curl_multi_perform (multi, &running); + while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform (multi, &running)); if (running == 0) { msg = curl_multi_info_read (multi, &running);