You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2006/11/22 22:26:15 UTC
svn commit: r478327 - /apr/apr/trunk/test/testsock.c
Author: wrowe
Date: Wed Nov 22 13:26:14 2006
New Revision: 478327
URL: http://svn.apache.org/viewvc?view=rev&rev=478327
Log:
Better exception handling of deferred socket connect outcomes.
Modified:
apr/apr/trunk/test/testsock.c
Modified: apr/apr/trunk/test/testsock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testsock.c?view=diff&rev=478327&r1=478326&r2=478327
==============================================================================
--- apr/apr/trunk/test/testsock.c (original)
+++ apr/apr/trunk/test/testsock.c Wed Nov 22 13:26:14 2006
@@ -258,12 +258,18 @@
* succeed (if the connection can be established synchronously),
* but if it does, this test cannot proceed. */
rv = apr_socket_connect(cd, sa);
- if (!APR_STATUS_IS_EINPROGRESS(rv)) {
+ if (rv == APR_SUCCESS) {
apr_socket_close(ld);
apr_socket_close(cd);
- APR_ASSERT_SUCCESS(tc, "connect to listener", rv);
ABTS_NOT_IMPL(tc, "Cannot test if connect completes "
"synchronously");
+ return;
+ }
+
+ if (!APR_STATUS_IS_EINPROGRESS(rv)) {
+ apr_socket_close(ld);
+ apr_socket_close(cd);
+ APR_ASSERT_SUCCESS(tc, "connect to listener", rv);
return;
}