summaryrefslogtreecommitdiff
path: root/test/testsock.c
diff options
context:
space:
mode:
authorrooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68>2006-02-09 05:55:22 +0000
committerrooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68>2006-02-09 05:55:22 +0000
commit6ae81f05a8c66f65feb6574e5973d6f5d9bb8356 (patch)
tree7d2062b05b25fca270202806e1802fcd2b1939a6 /test/testsock.c
parent41fd71a8ce137419a16fc1fa6d21c07529623420 (diff)
downloadlibapr-6ae81f05a8c66f65feb6574e5973d6f5d9bb8356.tar.gz
Avoid a hang when running the tests on win32.
* tesst/testsock.c (test_get_addr): Return if the apr_socket_connect fails. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@376196 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testsock.c')
-rw-r--r--test/testsock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/testsock.c b/test/testsock.c
index 1c648ec76..06e4ba177 100644
--- a/test/testsock.c
+++ b/test/testsock.c
@@ -253,9 +253,11 @@ static void test_get_addr(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "enable non-block mode",
apr_socket_opt_set(cd, APR_SO_NONBLOCK, 1));
-
- /* initiate connection */
- apr_socket_connect(cd, sa);
+
+ rv = apr_socket_connect(cd, sa);
+ APR_ASSERT_SUCCESS(tc, "make the connection", rv);
+ if (rv)
+ return;
APR_ASSERT_SUCCESS(tc, "accept connection",
apr_socket_accept(&sd, ld, p));