diff options
author | Stefan Eissing <icing@apache.org> | 2015-11-23 15:30:07 +0100 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2015-11-23 15:30:07 +0100 |
commit | 1497a895302b918c2a945cde0b6d0c22aa48b335 (patch) | |
tree | 449850c0d5b0219fb98c5e5a97b1b2ada3feedab /modules/http2/h2_worker.c | |
parent | Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive). (diff) | |
download | apache2-1497a895302b918c2a945cde0b6d0c22aa48b335.tar.xz apache2-1497a895302b918c2a945cde0b6d0c22aa48b335.zip |
fixes races during session shutdown when connection is aborted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715833 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/http2/h2_worker.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/http2/h2_worker.c b/modules/http2/h2_worker.c index b11e8549ff..3119cb081e 100644 --- a/modules/http2/h2_worker.c +++ b/modules/http2/h2_worker.c @@ -96,8 +96,9 @@ h2_worker *h2_worker_create(int id, apr_allocator_t *allocator = NULL; apr_pool_t *pool = NULL; h2_worker *w; + apr_status_t status; - apr_status_t status = apr_allocator_create(&allocator); + status = apr_allocator_create(&allocator); if (status != APR_SUCCESS) { return NULL; } @@ -126,7 +127,6 @@ h2_worker *h2_worker_create(int id, apr_pool_pre_cleanup_register(w->pool, w, cleanup_join_thread); apr_thread_create(&w->thread, attr, execute, w, w->pool); - apr_pool_create(&w->task_pool, w->pool); } return w; } @@ -167,7 +167,11 @@ h2_task *h2_worker_create_task(h2_worker *worker, h2_mplx *m, /* Create a subpool from the worker one to be used for all things * with life-time of this task execution. */ + if (!worker->task_pool) { + apr_pool_create(&worker->task_pool, worker->pool); + } task = h2_task_create(m->id, req, worker->task_pool, m, eos); + /* Link the task to the worker which provides useful things such * as mutex, a socket etc. */ task->io = worker->io; |