apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r376196 - /apr/apr/trunk/test/testsock.c
Date Thu, 09 Feb 2006 05:55:23 GMT
Author: rooneg
Date: Wed Feb  8 21:55:22 2006
New Revision: 376196

URL: http://svn.apache.org/viewcvs?rev=376196&view=rev
Log:
Avoid a hang when running the tests on win32.

* tesst/testsock.c
  (test_get_addr): Return if the apr_socket_connect fails.

Modified:
    apr/apr/trunk/test/testsock.c

Modified: apr/apr/trunk/test/testsock.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/testsock.c?rev=376196&r1=376195&r2=376196&view=diff
==============================================================================
--- apr/apr/trunk/test/testsock.c (original)
+++ apr/apr/trunk/test/testsock.c Wed Feb  8 21:55:22 2006
@@ -253,9 +253,11 @@
 
     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));



Mime
View raw message