lib/curl/Multi: remove the Wait() overload with "int" timeout
Enforce type-safety.
This commit is contained in:
parent
435f1eb6cc
commit
d207c144d6
|
@ -98,16 +98,12 @@ public:
|
||||||
return running_handles;
|
return running_handles;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned Wait(int timeout) {
|
unsigned Wait(std::chrono::duration<int, std::chrono::milliseconds::period> timeout) {
|
||||||
int numfds;
|
int numfds;
|
||||||
auto code = curl_multi_wait(handle, nullptr, 0, timeout,
|
auto code = curl_multi_wait(handle, nullptr, 0, timeout.count(),
|
||||||
&numfds);
|
&numfds);
|
||||||
if (code != CURLM_OK)
|
if (code != CURLM_OK)
|
||||||
throw std::runtime_error(curl_multi_strerror(code));
|
throw std::runtime_error(curl_multi_strerror(code));
|
||||||
return numfds;
|
return numfds;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned Wait(std::chrono::milliseconds timeout) {
|
|
||||||
return Wait(timeout.count());
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue