Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG/MINOR: proto_reverse_connect: fix FD leak upon connect
new_reverse_conn() is creating its own socket with sock_create_server_socket(). However the connect is done with conn->ctrl->connect() which is tcp_connect_server(). tcp_connect_server() is also creating its own socket and sets it in the struct conn, left the previous socket unclosed and leaking at each attempt. This patch fixes the issue by letting tcp_connect_server() handling the socket part, and removes it in new_reverse_conn().
- Loading branch information