summaryrefslogtreecommitdiffstats
path: root/net/socket/socks_client_socket.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket/socks_client_socket.cc')
-rw-r--r--net/socket/socks_client_socket.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index db70461..4509bfa 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -107,7 +107,14 @@ int SOCKSClientSocket::Connect(CompletionCallback* callback,
void SOCKSClientSocket::Disconnect() {
completed_handshake_ = false;
+ host_resolver_.Cancel();
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 SOCKSClientSocket::IsConnected() const {