mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
sws.c: fix proxy mode secondary connection monitoring condition
This commit is contained in:
parent
0ce2bca741
commit
2b9fafd622
@ -1349,9 +1349,12 @@ static void http_connect(curl_socket_t *infdp,
|
|||||||
FD_ZERO(&output);
|
FD_ZERO(&output);
|
||||||
|
|
||||||
if((clientfd[DATA] == CURL_SOCKET_BAD) &&
|
if((clientfd[DATA] == CURL_SOCKET_BAD) &&
|
||||||
(serverfd[DATA] == CURL_SOCKET_BAD)) {
|
(serverfd[DATA] == CURL_SOCKET_BAD) &&
|
||||||
/* when secondary tunnel is not established the listener socket
|
poll_client_rd[CTRL] && poll_client_wr[CTRL] &&
|
||||||
is monitored to allow client to establish the secondary tunnel */
|
poll_server_rd[CTRL] && poll_server_wr[CTRL]) {
|
||||||
|
/* listener socket is monitored to allow client to establish
|
||||||
|
secondary tunnel only when this tunnel is not established
|
||||||
|
and primary one is fully operational */
|
||||||
FD_SET(rootfd, &input);
|
FD_SET(rootfd, &input);
|
||||||
maxfd = rootfd;
|
maxfd = rootfd;
|
||||||
}
|
}
|
||||||
@ -1837,7 +1840,7 @@ int main(int argc, char *argv[])
|
|||||||
use_gopher?"GOPHER":"HTTP", ipv_inuse, (int)port);
|
use_gopher?"GOPHER":"HTTP", ipv_inuse, (int)port);
|
||||||
|
|
||||||
/* start accepting connections */
|
/* start accepting connections */
|
||||||
rc = listen(sock, 2);
|
rc = listen(sock, 5);
|
||||||
if(0 != rc) {
|
if(0 != rc) {
|
||||||
error = SOCKERRNO;
|
error = SOCKERRNO;
|
||||||
logmsg("listen() failed with error: (%d) %s",
|
logmsg("listen() failed with error: (%d) %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user