[cpp-xmltooling] branch master updated: CPPXT-132 - Slowdown dependent on curl version

Scott Cantor cantor.2 at osu.edu
Thu Jun 7 09:44:12 EDT 2018


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

scantor pushed a commit to branch master
in repository cpp-xmltooling.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=3fbd07d1684d9e9001f822fb62c50814b376c6ed

The following commit(s) were added to refs/heads/master by this push:
       new  3fbd07d   CPPXT-132 - Slowdown dependent on curl version
3fbd07d is described below

commit 3fbd07d1684d9e9001f822fb62c50814b376c6ed
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jun 7 09:42:46 2018 -0400

    CPPXT-132 - Slowdown dependent on curl version
    
    https://issues.shibboleth.net/jira/browse/CPPXT-132
---
 xmltooling/util/CurlURLInputStream.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/xmltooling/util/CurlURLInputStream.cpp b/xmltooling/util/CurlURLInputStream.cpp
index 24353e1..5962f2c 100644
--- a/xmltooling/util/CurlURLInputStream.cpp
+++ b/xmltooling/util/CurlURLInputStream.cpp
@@ -557,8 +557,15 @@ bool CurlURLInputStream::readMore(int* runningHandles)
 
         // Wait on the file descriptors
         timeval tv;
-        tv.tv_sec  = 2;
-        tv.tv_usec = 0;
+
+        long multi_timeout = 0;
+        curl_multi_timeout(fMulti, &multi_timeout);
+        if (multi_timeout < 0)
+            multi_timeout = 1000;
+
+        tv.tv_sec = multi_timeout / 1000;
+        tv.tv_usec = (multi_timeout % 1000) * 1000;
+
         select(fdcnt+1, &readSet, &writeSet, &exceptSet, &tv);
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list