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

Unified Diff: update_attempter.cc

Issue 5260004: AU: Retry up to 3 times 30 seconds apart on HTTP response code 0. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: address review comments Created 10 years, 1 month 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 | « libcurl_http_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_attempter.cc
diff --git a/update_attempter.cc b/update_attempter.cc
index 4e7d7bf586b64be10db6aa22237b66b75e8ab315..7c958cb777fb07fd7a8ec17bd0e2e8eb849fda23 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -162,11 +162,18 @@ void UpdateAttempter::Update(const std::string& app_version,
processor_->set_delegate(this);
// Actions:
+ LibcurlHttpFetcher* update_check_fetcher =
+ new LibcurlHttpFetcher(GetProxyResolver());
+ // If this is an automatic check, try harder to connect to the network. See
+ // comment in libcurl_http_fetcher.cc.
+ if (!obey_proxies) {
+ update_check_fetcher->set_no_network_max_retries(3);
+ }
shared_ptr<OmahaRequestAction> update_check_action(
new OmahaRequestAction(prefs_,
omaha_request_params_,
NULL,
- new LibcurlHttpFetcher(GetProxyResolver())));
+ update_check_fetcher)); // passes ownership
shared_ptr<OmahaResponseHandlerAction> response_handler_action(
new OmahaResponseHandlerAction(prefs_));
shared_ptr<FilesystemCopierAction> filesystem_copier_action(
« no previous file with comments | « libcurl_http_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698