ab was sending wrong number of requests when keepalive enabled.

Thanks to Bryn Dole for the patch.  
PR: 48497


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@940526 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Earl Poirier
2010-05-03 17:33:03 +00:00
parent 7ad50990c7
commit dcd34e931f
2 changed files with 8 additions and 2 deletions

View File

@ -671,6 +671,10 @@ static void ssl_proceed_handshake(struct connection *c)
static void write_request(struct connection * c)
{
if (started >= requests) {
return;
}
do {
apr_time_t tnow;
apr_size_t l = c->rwrite;
@ -724,6 +728,7 @@ static void write_request(struct connection * c)
} while (c->rwrite);
c->endwrite = lasttime = apr_time_now();
started++;
set_conn_state(c, STATE_READ);
}
@ -1267,7 +1272,6 @@ static void start_connect(struct connection * c)
/* connected first time */
set_conn_state(c, STATE_CONNECTED);
started++;
#ifdef USE_SSL
if (c->ssl) {
ssl_proceed_handshake(c);
@ -1798,7 +1802,6 @@ static void test(void)
}
else {
set_conn_state(c, STATE_CONNECTED);
started++;
#ifdef USE_SSL
if (c->ssl)
ssl_proceed_handshake(c);