oops, missed the shut-off non-blocking fix
This commit is contained in:
parent
b2362bf51c
commit
62056a644f
22
lib/url.c
22
lib/url.c
@ -1232,7 +1232,7 @@ static CURLcode ConnectPlease(struct UrlData *data,
|
|||||||
FD_ZERO (&connectfd);
|
FD_ZERO (&connectfd);
|
||||||
FD_SET(conn->firstsocket, &connectfd);
|
FD_SET(conn->firstsocket, &connectfd);
|
||||||
if (conn->data->connecttimeout > 0) {
|
if (conn->data->connecttimeout > 0) {
|
||||||
nonblock = 1;
|
nonblock = 1;
|
||||||
}
|
}
|
||||||
ioctlsocket(conn->firstsocket, FIONBIO, &nonblock);
|
ioctlsocket(conn->firstsocket, FIONBIO, &nonblock);
|
||||||
#endif
|
#endif
|
||||||
@ -1241,14 +1241,18 @@ static CURLcode ConnectPlease(struct UrlData *data,
|
|||||||
sizeof(conn->serv_addr)
|
sizeof(conn->serv_addr)
|
||||||
) < 0) {
|
) < 0) {
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
conntimeout.tv_sec = conn->data->connecttimeout;
|
conntimeout.tv_sec = conn->data->connecttimeout;
|
||||||
conntimeout.tv_usec = 0;
|
conntimeout.tv_usec = 0;
|
||||||
if(-1 != select (conn->firstsocket + 1, NULL, &connectfd, NULL, &conntimeout)) {
|
if(-1 != select (conn->firstsocket + 1, NULL, &connectfd, NULL, &conntimeout)) {
|
||||||
if (FD_ISSET(conn->firstsocket, &connectfd))
|
if (FD_ISSET(conn->firstsocket, &connectfd)) {
|
||||||
return CURLE_OK;
|
/* shut off non-blocking again */
|
||||||
else
|
nonblock = 0;
|
||||||
errno = EINTR;
|
ioctlsocket(conn->firstsocket, FIONBIO, &nonblock);
|
||||||
}
|
return CURLE_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
errno = EINTR;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
switch(errno) {
|
switch(errno) {
|
||||||
#ifdef ECONNREFUSED
|
#ifdef ECONNREFUSED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user