mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-06 02:40:04 -04:00
the win32 changes for regress_http broke the regression test under unix. making the socket non-blocking can return -1 on connect; so now, we need to check the errno; not sure if that is supported under windows.
svn:r621
This commit is contained in:
parent
955c6abf53
commit
024804cce7
@ -144,8 +144,10 @@ http_connect(const char *address, u_short port)
|
|||||||
event_err(1, "socket failed");
|
event_err(1, "socket failed");
|
||||||
|
|
||||||
evutil_make_socket_nonblocking(fd);
|
evutil_make_socket_nonblocking(fd);
|
||||||
if (connect(fd, sa, slen) == -1)
|
if (connect(fd, sa, slen) == -1) {
|
||||||
event_err(1, "connect failed");
|
if (errno != EINPROGRESS)
|
||||||
|
event_err(1, "connect failed");
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
freeaddrinfo(aitop);
|
freeaddrinfo(aitop);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user