summaryrefslogtreecommitdiffstats
path: root/net/socket/client_socket_handle.cc
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 20:59:49 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 20:59:49 +0000
commita34f61ee4f3ebc44edc4d144f892841c1e99619a (patch)
treeac38618da85920e5fa50af2be83a0d09a3f3fad2 /net/socket/client_socket_handle.cc
parent5938bb1257f7beb2028f9c6acea9a0605e54bde3 (diff)
downloadchromium_src-a34f61ee4f3ebc44edc4d144f892841c1e99619a.zip
chromium_src-a34f61ee4f3ebc44edc4d144f892841c1e99619a.tar.gz
chromium_src-a34f61ee4f3ebc44edc4d144f892841c1e99619a.tar.bz2
Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE.
We retry requests on ERR_CONNECTION_CLOSED in case of a close/reuse race, but ERR_CONNECTION_CLOSED is converted to ERR_EMPTY_RESPONSE if this is a socket's first request. Such a socket is normally not reused unless it was a preconnect miss. To avoid test flakiness, make the UNUSED vs UNUSED_IDLE determination not timing-sensitive. The existing logic is compares idle_time to 0, so it's dependent on clock granularity rather than any intentional timeout. Add equivalent tests to HttpNetworkTransactionTest.KeepAliveConnection for preconnect misses. BUG=352156 Review URL: https://codereview.chromium.org/197283012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/client_socket_handle.cc')
-rw-r--r--net/socket/client_socket_handle.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket/client_socket_handle.cc b/net/socket/client_socket_handle.cc
index e42e9fc..53bcd77 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -19,7 +19,7 @@ ClientSocketHandle::ClientSocketHandle()
: is_initialized_(false),
pool_(NULL),
higher_pool_(NULL),
- is_reused_(false),
+ reuse_type_(ClientSocketHandle::UNUSED),
callback_(base::Bind(&ClientSocketHandle::OnIOComplete,
base::Unretained(this))),
is_ssl_error_(false) {}
@@ -58,7 +58,7 @@ void ClientSocketHandle::ResetInternal(bool cancel) {
is_initialized_ = false;
socket_.reset();
group_name_.clear();
- is_reused_ = false;
+ reuse_type_ = ClientSocketHandle::UNUSED;
user_callback_.Reset();
if (higher_pool_)
RemoveHigherLayeredPool(higher_pool_);