summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/http/http_network_transaction.cc3
-rw-r--r--net/socket/client_socket_handle.h6
2 files changed, 5 insertions, 4 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;
}
diff --git a/net/socket/client_socket_handle.h b/net/socket/client_socket_handle.h
index ce0a001..d323313 100644
--- a/net/socket/client_socket_handle.h
+++ b/net/socket/client_socket_handle.h
@@ -28,9 +28,9 @@ namespace net {
class ClientSocketHandle {
public:
typedef enum {
- UNUSED = 0,
- UNUSED_IDLE,
- REUSED_IDLE,
+ UNUSED = 0, // unused socket that just finished connectin
+ UNUSED_IDLE, // unused socket that has been idle for awhile
+ REUSED_IDLE, // previously used socket
NUM_TYPES,
} SocketReuseType;