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:
Scott Graham 2015-02-06 10:10:55 -08:00
Родитель 242619d958
Коммит b16b89c89d
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -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;