Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1798)

Unified Diff: util/net/http_transport_win.cc

Issue 897393002: Make HTTPTransportWin respect user timeout (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/net/http_transport_win.cc
diff --git a/util/net/http_transport_win.cc b/util/net/http_transport_win.cc
index 99f87ba26cc63d0c95ce4c3f66097c6f6d2a4cb4..2fe89deb22ed165e3ac203e464aaa1065d98dcf0 100644
--- a/util/net/http_transport_win.cc
+++ b/util/net/http_transport_win.cc
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698