Refine the output

This commit is contained in:
Max Lv
2016-05-06 15:16:27 +08:00
parent e3deb0668d
commit a73fe213a6
+8 -3
View File
@@ -416,9 +416,14 @@ static remote_t *connect_to_remote(struct addrinfo *res,
remote_t *remote = new_remote(sockfd);
// setup remote socks
setnonblocking(sockfd);
if (bind_to_address(sockfd, bind_address) == -1)
ERROR("bind_to_address");
if (setnonblocking(sockfd) == -1)
ERROR("setnonblocking");
if (bind_address != NULL)
if (bind_to_address(sockfd, bind_address) == -1)
ERROR("bind_to_address");
#ifdef SET_INTERFACE
if (iface) {
if (setinterface(sockfd, iface) == -1)