blob: 7d5b4984dbdd64b00bb50b5c10c022f877a5b6a6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- tsocks.c.orig 2014-12-19 02:01:24 UTC
+++ tsocks.c
@@ -852,7 +852,7 @@ static int connect_server(struct connreq
sizeof(conn->serveraddr));
show_msg(MSGDEBUG, "Connect returned %d, errno is %d\n", rc, errno);
- if (rc) {
+ if (rc && errno != EISCONN) {
if (errno != EINPROGRESS) {
show_msg(MSGERR, "Error %d attempting to connect to SOCKS "
"server (%s)\n", errno, strerror(errno));
@@ -862,6 +862,7 @@ static int connect_server(struct connreq
conn->state = CONNECTING;
}
} else {
+ rc = 0;
show_msg(MSGDEBUG, "Socket %d connected to SOCKS server\n", conn->sockid);
conn->state = CONNECTED;
}
|