summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authortoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 02:43:20 +0000
committertoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 02:43:20 +0000
commit2ecf02c3cff03b9473d44c77770ac662793182b1 (patch)
treeccb0652ca54521574a7d37f5df5ee8421ccc71f5 /net/socket_stream
parentbb1889548091c80f27af9bebf6478272b8daae2b (diff)
downloadchromium_src-2ecf02c3cff03b9473d44c77770ac662793182b1.zip
chromium_src-2ecf02c3cff03b9473d44c77770ac662793182b1.tar.gz
chromium_src-2ecf02c3cff03b9473d44c77770ac662793182b1.tar.bz2
SocketStream failed to resume the state machine after SSLManager decision
SocketStream should hold its state as next_state_ before suspending with ERR_IO_PENDING. This information is required to resume the state machine. BUG=119793, 53836 TEST=manual test with TLS-enabled pywebsocket console page Review URL: http://codereview.chromium.org/9809019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index 8560733..c5a8b2a 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -942,6 +942,8 @@ int SocketStream::DoSecureProxyConnect() {
int SocketStream::DoSecureProxyConnectComplete(int result) {
DCHECK_EQ(STATE_NONE, next_state_);
result = DidEstablishSSL(result, &proxy_ssl_config_);
+ if (result == ERR_IO_PENDING)
+ next_state_ = STATE_SECURE_PROXY_CONNECT_COMPLETE;
if (next_state_ != STATE_NONE)
return result;
if (result == ERR_SSL_CLIENT_AUTH_CERT_NEEDED)
@@ -972,6 +974,8 @@ int SocketStream::DoSSLConnect() {
int SocketStream::DoSSLConnectComplete(int result) {
DCHECK_EQ(STATE_NONE, next_state_);
result = DidEstablishSSL(result, &server_ssl_config_);
+ if (result == ERR_IO_PENDING)
+ next_state_ = STATE_SSL_CONNECT_COMPLETE;
if (next_state_ != STATE_NONE)
return result;
// TODO(toyoshim): Upgrade to SPDY through TLS NPN extension if possible.