File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,9 @@ int flb_io_net_connect(struct flb_connection *connection,
110110 int async = FLB_FALSE ;
111111 flb_sockfd_t fd = -1 ;
112112 int flags = flb_connection_get_flags (connection );
113- // struct flb_upstream *u = u_conn->u;
114113
115114 if (connection -> fd > 0 ) {
116115 flb_socket_close (connection -> fd );
117-
118116 connection -> fd = -1 ;
119117 connection -> event .fd = -1 ;
120118 }
@@ -146,9 +144,10 @@ int flb_io_net_connect(struct flb_connection *connection,
146144 connection -> upstream -> tcp_host ,
147145 connection -> upstream -> tcp_port );
148146
149- flb_socket_close (fd );
150-
151- return -1 ;
147+ flb_socket_close (fd );
148+ connection -> fd = -1 ;
149+ connection -> event .fd = -1 ;
150+ return -1 ;
152151 }
153152 flb_debug ("[http_client] flb_http_client_proxy_connect connection #%i connected to %s:%i." ,
154153 connection -> fd ,
@@ -163,7 +162,8 @@ int flb_io_net_connect(struct flb_connection *connection,
163162
164163 if (ret == -1 ) {
165164 flb_socket_close (fd );
166-
165+ connection -> fd = -1 ;
166+ connection -> event .fd = -1 ;
167167 return -1 ;
168168 }
169169 }
You can’t perform that action at this time.
0 commit comments