From: Jeff Trawick Date: Fri, 6 Nov 2009 22:33:37 +0000 (+0000) Subject: update pollset to reflect changed connection state before closing the socket; X-Git-Tag: 2.3.3~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b84ebe0f5876354afc57573c1adf2f90c106696;p=apache 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) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833583 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 0baf8ce7aa..d818d23d9a 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1784,6 +1784,7 @@ static void test(void) 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 @@ static void test(void) "\nTest aborted after 10 failures\n\n"); apr_err("apr_socket_connect()", rv); } - set_conn_state(c, STATE_UNCONNECTED); start_connect(c); continue; }