summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-22 21:20:11 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-22 21:20:11 +0000
commitcd273121c86aa74e90a894906a091b84b79e61c9 (patch)
treea54c514e697589fc633d6f0c9d44577e147d61bc /net/http
parent38d1b119c965bc2bdf4c61956f6e3fa322cad42b (diff)
downloadchromium_src-cd273121c86aa74e90a894906a091b84b79e61c9.zip
chromium_src-cd273121c86aa74e90a894906a091b84b79e61c9.tar.gz
chromium_src-cd273121c86aa74e90a894906a091b84b79e61c9.tar.bz2
Resend on IO errors on late bound sockets that were idle.
According to UMA data, late bound sockets that were idle are significantly more likely to get (reset/close/abort) errors. Currently, we don't resend on late bound sockets that were idle because they weren't reused. This changes that. TODO: determine how long a socket has to be idle before it is likely to get a TCP RST if we try to reuse it. Also document the ClientSocketHandle::ReuseSocketType values. BUG=http://crbug.com/18192. Review URL: http://codereview.chromium.org/174287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_network_transaction.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 79be223..d37bab4 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1554,7 +1554,8 @@ bool HttpNetworkTransaction::ShouldResendRequest() const {
// This automatically prevents an infinite resend loop because we'll run
// out of the cached keep-alive connections eventually.
if (establishing_tunnel_ ||
- !reused_socket_ || // We didn't reuse a keep-alive connection.
+ // We used a socket that was never idle.
+ connection_.reuse_type() == ClientSocketHandle::UNUSED ||
header_buf_len_) { // We have received some response headers.
return false;
}