Improve client performance by clearing connection pool instead

of destroying it.

PR 40054
Submitted by: Brad Roberts <braddr puremagic.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655654 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roy T. Fielding
2008-05-12 21:24:26 +00:00
parent 07bf18059d
commit cd7f5da7d4
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,9 @@
Changes with Apache 2.3.0 Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ] [ When backported to 2.2.x, remove entry from this file ]
*) ab: Improve client performance by clearing connection pool instead
of destroying it. PR 40054 [Brad Roberts <braddr puremagic.com>]
*) ab: Don't stop sending a request if EAGAIN is returned, which *) ab: Don't stop sending a request if EAGAIN is returned, which
will only happen if both the write and subsequent wait are will only happen if both the write and subsequent wait are
returning EAGAIN, and count posted bytes correctly when the initial returning EAGAIN, and count posted bytes correctly when the initial

View File

@ -1137,8 +1137,9 @@ static void start_connect(struct connection * c)
c->gotheader = 0; c->gotheader = 0;
c->rwrite = 0; c->rwrite = 0;
if (c->ctx) if (c->ctx)
apr_pool_destroy(c->ctx); apr_pool_clear(c->ctx);
apr_pool_create(&c->ctx, cntxt); else
apr_pool_create(&c->ctx, cntxt);
if ((rv = apr_socket_create(&c->aprsock, destsa->family, if ((rv = apr_socket_create(&c->aprsock, destsa->family,
SOCK_STREAM, 0, c->ctx)) != APR_SUCCESS) { SOCK_STREAM, 0, c->ctx)) != APR_SUCCESS) {