From 93b60f81bdd6d7193845f6a7731ab766b00d9556 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sun, 23 Jun 2019 05:18:50 +0800 Subject: [PATCH] socket: Fix a bug in TCPClientSocket Needed by transparent proxying. --- src/net/socket/tcp_client_socket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/socket/tcp_client_socket.cc b/src/net/socket/tcp_client_socket.cc index 46d0a7d585..dab26ff044 100644 --- a/src/net/socket/tcp_client_socket.cc +++ b/src/net/socket/tcp_client_socket.cc @@ -137,7 +137,7 @@ TCPClientSocket::TCPClientSocket(std::unique_ptr socket, : socket_(std::move(socket)), bind_address_(std::move(bind_address)), addresses_(addresses), - current_address_index_(-1), + current_address_index_(current_address_index), next_connect_state_(CONNECT_STATE_NONE), previously_disconnected_(false), total_received_bytes_(0),