diff options
Diffstat (limited to 'net')
-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 6501a59..076d18f 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 ed9d87d..f820955 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_) |