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

Unified Diff: net/dns/dns_transaction.cc

Issue 14676012: [net/dns] Fix how DnsTransaction computes next server index after fallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_transaction.cc
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 6d4bf01217b19ecbcc572e79a86f556850b9c010..fdd2eb25dfca153bdc94848c587e89bbcd61e63c 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -651,8 +651,8 @@ class DnsTransactionImpl : public DnsTransaction,
const DnsConfig& config = session_->config();
- unsigned server_index = first_server_index_ +
- (attempt_number % config.nameservers.size());
+ unsigned server_index =
+ (first_server_index_ + attempt_number) % config.nameservers.size();
scoped_ptr<DnsSession::SocketLease> lease =
session_->AllocateSocket(server_index, net_log_.source());
« no previous file with comments | « no previous file | net/dns/dns_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698