diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-07 22:50:10 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-07 22:50:10 +0000 |
commit | 16a0274914dce60fb4a7a0ba72e5c090277d3e2e (patch) | |
tree | 0dcb19a81cf0b67fd0c8d63e11be26025cf7295e /net/socket/socks5_client_socket.cc | |
parent | 9b7f9ae5175762408d10f544e2dba412ac31519f (diff) | |
download | chromium_src-16a0274914dce60fb4a7a0ba72e5c090277d3e2e.zip chromium_src-16a0274914dce60fb4a7a0ba72e5c090277d3e2e.tar.gz chromium_src-16a0274914dce60fb4a7a0ba72e5c090277d3e2e.tar.bz2 |
Cancel any outstanding host resolve when calling SOCKSClientSocket::Disconnect().
BUG=25440
TEST=SOCKSClientSocketTest.DisconnectWhileHostResolveInProgress
Review URL: http://codereview.chromium.org/525084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socks5_client_socket.cc')
-rw-r--r-- | net/socket/socks5_client_socket.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc index a709f59..d546231 100644 --- a/net/socket/socks5_client_socket.cc +++ b/net/socket/socks5_client_socket.cc @@ -94,6 +94,12 @@ int SOCKS5ClientSocket::Connect(CompletionCallback* callback, void SOCKS5ClientSocket::Disconnect() { completed_handshake_ = false; transport_->Disconnect(); + + // Reset other states to make sure they aren't mistakenly used later. + // These are the states initialized by Connect(). + next_state_ = STATE_NONE; + user_callback_ = NULL; + load_log_ = NULL; } bool SOCKS5ClientSocket::IsConnected() const { |