Make HTTPTransportWin respect user timeout
Uses solution suggested in linked bug. No test as it'd be flaky, slow, or both. R=mark@chromium.org BUG=crashpad:8 Review URL: https://codereview.chromium.org/897393002
This commit is contained in:
Родитель
242619d958
Коммит
b16b89c89d
|
@ -97,6 +97,16 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
|
|||
return false;
|
||||
}
|
||||
|
||||
int timeout_in_ms = static_cast<int>(timeout() * 1000);
|
||||
if (!WinHttpSetTimeouts(session.get(),
|
||||
timeout_in_ms,
|
||||
timeout_in_ms,
|
||||
timeout_in_ms,
|
||||
timeout_in_ms)) {
|
||||
LogErrorWinHttpMessage("WinHttpSetTimeouts");
|
||||
return false;
|
||||
}
|
||||
|
||||
URL_COMPONENTS url_components = {0};
|
||||
url_components.dwStructSize = sizeof(URL_COMPONENTS);
|
||||
url_components.dwHostNameLength = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче