diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 21:04:13 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 21:04:13 +0000 |
commit | da5b6de33c18e49a8c1f3fb3c05f779e07a2240d (patch) | |
tree | 4525e52a3213d2441cf70f0063303724fd47b25f /net | |
parent | ccfa0e5964dde0f5697a9d62e6e0f58951ad8871 (diff) | |
download | chromium_src-da5b6de33c18e49a8c1f3fb3c05f779e07a2240d.zip chromium_src-da5b6de33c18e49a8c1f3fb3c05f779e07a2240d.tar.gz chromium_src-da5b6de33c18e49a8c1f3fb3c05f779e07a2240d.tar.bz2 |
Revert "net: uncork NSS sockets after a 200ms timeout."
Heap check went red. I don't think it was this patch, but reverting just to be
safe.
commit 502e93deaa8bb18030f9164b23480a79123d79e5
Author: agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Tue Oct 5 19:30:18 2010 +0000
net: uncork NSS sockets after a 200ms timeout.
We found that, after the recent corking change (r58838), we could end
up not sending the Finished message for an extended period of time.
This would cause servers to time out our SSL connections because they
thought that we were still performing the handshake.
With this change, we'll uncork and flush buffers after 200ms if no
application data is ready.
BUG=58017
TEST=Make HTTPS connections to Google sites. Check that the servers are terminating our idle connections.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61546 0039d316-1c4b-4281-b951-d872f2087c98
BUG=58017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/socket/ssl_client_socket_nss.cc | 25 | ||||
-rw-r--r-- | net/socket/ssl_client_socket_nss.h | 5 |
2 files changed, 2 insertions, 28 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc index f30d56c..df476e9 100644 --- a/net/socket/ssl_client_socket_nss.cc +++ b/net/socket/ssl_client_socket_nss.cc @@ -91,12 +91,6 @@ static const int kRecvBufferSize = 4096; -// kCorkTimeoutMs is the number of milliseconds for which we'll wait for a -// Write to an SSL socket which we're False Starting. Since corking stops the -// Finished message from being sent, the server sees an incomplete handshake -// and some will time out such sockets quite aggressively. -static const int kCorkTimeoutMs = 200; - namespace net { // State machines are easier to debug if you log state transitions. @@ -697,14 +691,6 @@ bool SSLClientSocketNSS::IsNPNProtocolMispredicted() { return predicted_npn_proto_ != npn_proto; } -void SSLClientSocketNSS::UncorkAfterTimeout() { - corked_ = false; - int nsent; - do { - nsent = BufferSend(); - } while (nsent > 0); -} - int SSLClientSocketNSS::Connect(CompletionCallback* callback) { EnterFunction(""); DCHECK(transport_.get()); @@ -1122,10 +1108,7 @@ int SSLClientSocketNSS::Write(IOBuffer* buf, int buf_len, return rv; } - if (corked_) { - corked_ = false; - uncork_timer_.Reset(); - } + corked_ = false; int rv = DoWriteLoop(OK); if (rv == ERR_IO_PENDING) { @@ -1730,12 +1713,8 @@ SECStatus SSLClientSocketNSS::OwnAuthCertHandler(void* arg, NOTREACHED(); if (false_start) { SSLClientSocketNSS* that = reinterpret_cast<SSLClientSocketNSS*>(arg); - if (!that->handshake_callback_called_) { + if (!that->handshake_callback_called_) that->corked_ = true; - that->uncork_timer_.Start( - base::TimeDelta::FromMilliseconds(kCorkTimeoutMs), - that, &SSLClientSocketNSS::UncorkAfterTimeout); - } } #endif diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h index 7b9809b..7f5ee94 100644 --- a/net/socket/ssl_client_socket_nss.h +++ b/net/socket/ssl_client_socket_nss.h @@ -16,7 +16,6 @@ #include "base/scoped_ptr.h" #include "base/time.h" -#include "base/timer.h" #include "net/base/cert_verify_result.h" #include "net/base/completion_callback.h" #include "net/base/net_log.h" @@ -103,7 +102,6 @@ class SSLClientSocketNSS : public SSLClientSocket { void SaveSnapStartInfo(); bool LoadSnapStartInfo(const std::string& info); bool IsNPNProtocolMispredicted(); - void UncorkAfterTimeout(); bool DoTransportIO(); int BufferSend(void); @@ -132,9 +130,6 @@ class SSLClientSocketNSS : public SSLClientSocket { // corked_ is true if we are currently suspending writes to the network. This // is named after the similar kernel flag, TCP_CORK. bool corked_; - // uncork_timer_ is used to limit the amount of time that we'll delay the - // Finished message while waiting for a Write. - base::OneShotTimer<SSLClientSocketNSS> uncork_timer_; scoped_refptr<IOBuffer> recv_buffer_; CompletionCallbackImpl<SSLClientSocketNSS> handshake_io_callback_; |