mirror of
https://github.com/curl/curl.git
synced 2026-05-30 17:37:28 +03:00
multi: fix small timeouts
Since Curl_timediff rounds down to the millisecond, timeouts which expire in less than 1ms are considered as outdated and removed from the list. We can use Curl_timediff_us instead, big timeouts could saturate but this is not an issue. Closes #11937
This commit is contained in:
parent
06133d3e9b
commit
579f09343d
1 changed files with 1 additions and 1 deletions
|
|
@ -3139,7 +3139,7 @@ static CURLMcode add_next_timeout(struct curltime now,
|
|||
struct Curl_llist_element *n = e->next;
|
||||
timediff_t diff;
|
||||
node = (struct time_node *)e->ptr;
|
||||
diff = Curl_timediff(node->time, now);
|
||||
diff = Curl_timediff_us(node->time, now);
|
||||
if(diff <= 0)
|
||||
/* remove outdated entry */
|
||||
Curl_llist_remove(list, e, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue