Revert "lib/curl/Global: remove lower bound on timeouts"
This reverts commit 4475b8ca04
. Further
testing revealed that the threaded resolver still uses a timeout of
0ms. This revert however lowers the bound to a minimum of 1ms instead
of 10ms.
This commit is contained in:
parent
0dffe05bf7
commit
6d54928d7c
|
@ -225,6 +225,13 @@ CurlGlobal::UpdateTimeout(long timeout_ms) noexcept
|
|||
return;
|
||||
}
|
||||
|
||||
if (timeout_ms < 1)
|
||||
/* CURL's threaded resolver sets a timeout of 0ms, which
|
||||
means we're running in a busy loop. Quite a bad
|
||||
idea to waste so much CPU. Let's use a lower limit
|
||||
of 1ms. */
|
||||
timeout_ms = 1;
|
||||
|
||||
timeout_event.Schedule(std::chrono::milliseconds(timeout_ms));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue