mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
don't poll libcurl if we have no running transfers
This commit is contained in:
@@ -180,7 +180,7 @@ pub const Client = struct {
|
||||
var running: c_int = undefined;
|
||||
try errorMCheck(c.curl_multi_perform(multi, &running));
|
||||
|
||||
if (timeout_ms > 0) {
|
||||
if (running > 0 and timeout_ms > 0) {
|
||||
try errorMCheck(c.curl_multi_poll(multi, null, 0, timeout_ms, null));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user