Index: net/proxy/proxy_list.cc |
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc |
index 5574f0162cfdae95140605e73993a2d0ed2735ae..7d53b4cfb7ebd485eaada9d0096bfe012677bec1 100644 |
--- a/net/proxy/proxy_list.cc |
+++ b/net/proxy/proxy_list.cc |
@@ -187,16 +187,13 @@ void ProxyList::AddProxyToRetryList(ProxyRetryInfoMap* proxy_retry_info, |
int net_error, |
const BoundNetLog& net_log) const { |
// Mark this proxy as bad. |
+ TimeTicks bad_until = TimeTicks::Now() + retry_delay; |
std::string proxy_key = proxy_to_retry.ToURI(); |
ProxyRetryInfoMap::iterator iter = proxy_retry_info->find(proxy_key); |
- if (iter != proxy_retry_info->end()) { |
- // TODO(nsylvain): This is not the first time we get this. We should |
- // double the retry time. Bug 997660. |
mmenke
2015/06/18 22:25:06
Wow...This is a bug ID from before Chrome was open
|
- iter->second.bad_until = TimeTicks::Now() + iter->second.current_delay; |
- } else { |
+ if (iter == proxy_retry_info->end() || bad_until > iter->second.bad_until) { |
ProxyRetryInfo retry_info; |
retry_info.current_delay = retry_delay; |
- retry_info.bad_until = TimeTicks().Now() + retry_info.current_delay; |
+ retry_info.bad_until = bad_until; |
retry_info.try_while_bad = try_while_bad; |
mmenke
2015/06/18 22:25:06
Seems like changing this could have unexpected sid
sclittle
2015/06/19 01:45:10
I see your point. Although I do think that this lo
mmenke
2015/06/19 15:15:56
Or could overwrite the old try_while_bad value if
sclittle
2015/06/19 19:55:36
Sure, let's wait for eroman then. I've added him a
|
retry_info.net_error = net_error; |
(*proxy_retry_info)[proxy_key] = retry_info; |