diff options
author | rofl0r <retnyg@gmx.net> | 2017-05-04 06:53:35 +0300 |
---|---|---|
committer | rofl0r <retnyg@gmx.net> | 2017-05-04 06:53:35 +0300 |
commit | ea8f4ff5dc693fd7f824796a8ac4816b0194178b (patch) | |
tree | 5afc8f1e9efeb937153ca66355e33928937a8571 | |
parent | bb3df1e4409190da2627d8a3b5bdd5e02d246f28 (diff) |
restore original socket flags after connectingnonblock2
the socket may have been in non-blocking mode originally.
addressing #171
-rw-r--r-- | src/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -700,8 +700,10 @@ int connect_proxy_chain(int sock, ip_type target_ip, } proxychains_write_log(TP " OK\n"); + int flags = fcntl(sock, F_GETFL, 0); dup2(ns, sock); close(ns); + fcntl(sock, F_SETFL, flags); return 0; error: if(ns != -1) |