When min connections is greater then zero connstructor is
called when the reslist is created.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105073
13f79535-47bb-0310-9956-
ffa450edef68
{
apr_pool_t *ctx;
proxy_conn_rec *conn;
{
apr_pool_t *ctx;
proxy_conn_rec *conn;
- server_rec *s = (server_rec *)params;
+ proxy_worker *worker = (proxy_worker *)params;
/* Create the subpool for each connection
* This keeps the memory consumption constant
/* Create the subpool for each connection
* This keeps the memory consumption constant
apr_pool_create(&ctx, pool);
conn = apr_pcalloc(ctx, sizeof(proxy_conn_rec));
apr_pool_create(&ctx, pool);
conn = apr_pcalloc(ctx, sizeof(proxy_conn_rec));
+ conn->pool = ctx;
+ conn->worker = worker;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: socket is constructed");
-
worker->min, worker->smax,
worker->hmax, worker->ttl,
connection_constructor, connection_destructor,
worker->min, worker->smax,
worker->hmax, worker->ttl,
connection_constructor, connection_destructor,
+ worker, worker->cp->pool);
apr_pool_cleanup_register(worker->cp->pool, (void *)worker,
conn_pool_cleanup,
apr_pool_cleanup_register(worker->cp->pool, (void *)worker,
conn_pool_cleanup,
- rv = connection_constructor((void **)&(worker->cp->conn), s, worker->cp->pool);
+ rv = connection_constructor((void **)&(worker->cp->conn), worker, worker->cp->pool);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"proxy: initialized single connection worker for (%s)",
worker->hostname);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"proxy: initialized single connection worker for (%s)",
worker->hostname);
{
/* create the new connection if the previous was destroyed */
if (!worker->cp->conn)
{
/* create the new connection if the previous was destroyed */
if (!worker->cp->conn)
- connection_constructor((void **)conn, s, worker->cp->pool);
+ connection_constructor((void **)conn, worker, worker->cp->pool);
else {
*conn = worker->cp->conn;
worker->cp->conn = NULL;
else {
*conn = worker->cp->conn;
worker->cp->conn = NULL;