gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 13/15: test_head: check libcurl for timeout value


From: gnunet
Subject: [libmicrohttpd] 13/15: test_head: check libcurl for timeout value
Date: Fri, 28 Oct 2022 11:22:02 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit f5d7b2fc925e4ba7c2268cb77b754a2fe19d5f13
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Oct 22 18:49:38 2022 +0300

    test_head: check libcurl for timeout value
---
 src/testcurl/test_head.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/testcurl/test_head.c b/src/testcurl/test_head.c
index 27daf66e..3c984125 100644
--- a/src/testcurl/test_head.c
+++ b/src/testcurl/test_head.c
@@ -612,6 +612,15 @@ performQueryExternal (struct MHD_Daemon *d, CURL *c, CURLM 
**multi_reuse)
       mhdErrorExitDesc ("MHD_get_fdset() failed");
     tv.tv_sec = 0;
     tv.tv_usec = 200000;
+    if (0 == MHD_get_timeout64s (d))
+      tv.tv_usec = 0;
+    else
+    {
+      long curl_to = -1;
+      curl_multi_timeout (multi, &curl_to);
+      if (0 == curl_to)
+        tv.tv_usec = 0;
+    }
 #ifdef MHD_POSIX_SOCKETS
     if (maxMhdSk > maxCurlSk)
       maxCurlSk = maxMhdSk;
@@ -625,7 +634,7 @@ performQueryExternal (struct MHD_Daemon *d, CURL *c, CURLM 
**multi_reuse)
       if ((WSAEINVAL != WSAGetLastError ()) ||
           (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) )
         externalErrorExitDesc ("Unexpected select() error");
-      Sleep (200);
+      Sleep ((unsigned long) tv.tv_usec / 1000);
 #endif
     }
     if (MHD_YES != MHD_run_from_select (d, &rs, &ws, &es))

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]