Commit 6d54928d authored by Max Kellermann's avatar Max Kellermann

Revert "lib/curl/Global: remove lower bound on timeouts"

This reverts commit 4475b8ca. 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.
parent 0dffe05b
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment