From 024804cce7101c5d09bb58e85d4ca7cc83f3e44d Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Fri, 28 Dec 2007 07:58:29 +0000 Subject: [PATCH] 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 --- test/regress_http.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/regress_http.c b/test/regress_http.c index 4f3b955a..707dca3a 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -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);