You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2009/11/06 23:33:38 UTC

svn commit: r833583 - /httpd/httpd/trunk/support/ab.c

Author: trawick
Date: Fri Nov  6 22:33:37 2009
New Revision: 833583

URL: http://svn.apache.org/viewvc?rev=833583&view=rev
Log:
update pollset to reflect changed connection state before closing the socket;
otherwise the pollset-remove can crash (at least with select-based poll, since
fd is now -1)

Modified:
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=833583&r1=833582&r2=833583&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Fri Nov  6 22:33:37 2009
@@ -1784,6 +1784,7 @@
                 if (c->state == STATE_CONNECTING) {
                     rv = apr_socket_connect(c->aprsock, destsa);
                     if (rv != APR_SUCCESS) {
+                        set_conn_state(c, STATE_UNCONNECTED);
                         apr_socket_close(c->aprsock);
                         err_conn++;
                         if (bad++ > 10) {
@@ -1791,7 +1792,6 @@
                                     "\nTest aborted after 10 failures\n\n");
                             apr_err("apr_socket_connect()", rv);
                         }
-                        set_conn_state(c, STATE_UNCONNECTED);
                         start_connect(c);
                         continue;
                     }