diff options
author | Kristian Monsen <kristianm@google.com> | 2011-09-15 14:10:54 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-09-19 17:53:38 +0100 |
commit | e4aeb840e5cd2acd20cf6b18af808af55a92e745 (patch) | |
tree | 437786ad40b9f1974b704022e81c249f5fa517ac | |
parent | d2fbc57a904aa88c9b79b1c34d6e2f5520a2ad78 (diff) | |
download | chromium-e4aeb840e5cd2acd20cf6b18af808af55a92e745.tar.gz |
Reapply: Fix for bug 5226268 [Browser] http keep-alive
Disabling connection reuse so we can disable keep-alives.
Needs a CL from external/webkit:
https://android-git.corp.google.com/g/#/c/135470/
Change-Id: I441682ee20f4b2ead8f0b0c945257ab56b607acf
-rw-r--r-- | net/http/http_basic_stream.cc | 6 | ||||
-rw-r--r-- | net/socket/tcp_client_socket_libevent.cc | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc index 6501a590..076d18f8 100644 --- a/net/http/http_basic_stream.cc +++ b/net/http/http_basic_stream.cc @@ -72,7 +72,13 @@ int HttpBasicStream::ReadResponseBody(IOBuffer* buf, int buf_len, } void HttpBasicStream::Close(bool not_reusable) { +#ifdef ANDROID + // Disable connection reuse for bug 5226268 + // [Browser] http keep-alive packets are sent too frequently to network + parser_->Close(true); +#else parser_->Close(not_reusable); +#endif } HttpStream* HttpBasicStream::RenewStreamForAuth() { diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc index ed9d87d0..f8209558 100644 --- a/net/socket/tcp_client_socket_libevent.cc +++ b/net/socket/tcp_client_socket_libevent.cc @@ -528,7 +528,12 @@ int TCPClientSocketLibevent::SetupSocket() { // This mirrors the behaviour on Windows. See the comment in // tcp_client_socket_win.cc after searching for "NODELAY". DisableNagle(socket_); // If DisableNagle fails, we don't care. + + // ANDROID: Disable TCP keep-alive for bug 5226268 + // [Browser] http keep-alive packets are sent too frequently to network +#ifndef ANDROID SetTCPKeepAlive(socket_); +#endif #ifdef ANDROID if (valid_uid_) |