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:
Niels Provos 2007-12-28 07:58:29 +00:00
parent 955c6abf53
commit 024804cce7

View File

@ -144,8 +144,10 @@ http_connect(const char *address, u_short port)
event_err(1, "socket failed");
evutil_make_socket_nonblocking(fd);
if (connect(fd, sa, slen) == -1)
event_err(1, "connect failed");
if (connect(fd, sa, slen) == -1) {
if (errno != EINPROGRESS)
event_err(1, "connect failed");
}
#ifndef WIN32
freeaddrinfo(aitop);