gnunet-svn
[Top][All Lists]
Advanced

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

[gnurl] 25/151: multi_poll: avoid busy-loop when called without easy han


From: gnunet
Subject: [gnurl] 25/151: multi_poll: avoid busy-loop when called without easy handles attached
Date: Fri, 20 Dec 2019 14:25:34 +0100

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 4e1eee1500202a6a21fbedbd6e84d0e6c9af4b50
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Nov 14 15:11:23 2019 +0100

    multi_poll: avoid busy-loop when called without easy handles attached
    
    Fixes #4594
    Closes #4595
    Reported-by: 3dyd on github
---
 lib/multi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/multi.c b/lib/multi.c
index 7e8e38dc9..a0de107f0 100755
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1157,6 +1157,10 @@ static CURLMcode Curl_multi_wait(struct Curl_multi 
*multi,
     if(!curl_multi_timeout(multi, &sleep_ms) && sleep_ms) {
       if(sleep_ms > timeout_ms)
         sleep_ms = timeout_ms;
+      /* when there are no easy handles in the multi, this holds a -1
+         timeout */
+      else if((sleep_ms < 0) && extrawait)
+        sleep_ms = timeout_ms;
       Curl_wait_ms((int)sleep_ms);
     }
   }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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