mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 04:08:47 +00:00
restore original socket flags after connecting
the socket may have been in non-blocking mode originally. addressing #171
This commit is contained in:
parent
bb3df1e440
commit
ea8f4ff5dc
@ -700,8 +700,10 @@ int connect_proxy_chain(int sock, ip_type target_ip,
|
|||||||
}
|
}
|
||||||
|
|
||||||
proxychains_write_log(TP " OK\n");
|
proxychains_write_log(TP " OK\n");
|
||||||
|
int flags = fcntl(sock, F_GETFL, 0);
|
||||||
dup2(ns, sock);
|
dup2(ns, sock);
|
||||||
close(ns);
|
close(ns);
|
||||||
|
fcntl(sock, F_SETFL, flags);
|
||||||
return 0;
|
return 0;
|
||||||
error:
|
error:
|
||||||
if(ns != -1)
|
if(ns != -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user