summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_nss.h
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-06 14:38:11 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-06 14:38:11 +0000
commita66397e4836935deec66807fa13650ad342de641 (patch)
tree49113a9a2ada56681f05fcb5398f9208e470d698 /net/socket/ssl_client_socket_nss.h
parent36013cd3c867f7a9d333a08617b23a38b74af7a9 (diff)
downloadchromium_src-a66397e4836935deec66807fa13650ad342de641.zip
chromium_src-a66397e4836935deec66807fa13650ad342de641.tar.gz
chromium_src-a66397e4836935deec66807fa13650ad342de641.tar.bz2
Revert Revert "net: uncork NSS sockets after a 200ms timeout."
First landed in r61546, reverted in r61560 in case it was causing heap check redness. Turned out to be innocent, so relanding. 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 conn···· git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_nss.h')
-rw-r--r--net/socket/ssl_client_socket_nss.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h
index 7f5ee94..7b9809b 100644
--- a/net/socket/ssl_client_socket_nss.h
+++ b/net/socket/ssl_client_socket_nss.h
@@ -16,6 +16,7 @@
#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"
@@ -102,6 +103,7 @@ class SSLClientSocketNSS : public SSLClientSocket {
void SaveSnapStartInfo();
bool LoadSnapStartInfo(const std::string& info);
bool IsNPNProtocolMispredicted();
+ void UncorkAfterTimeout();
bool DoTransportIO();
int BufferSend(void);
@@ -130,6 +132,9 @@ 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_;