summaryrefslogtreecommitdiff
path: root/modules/http2
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2022-09-27 11:00:10 +0000
committerStefan Eissing <icing@apache.org>2022-09-27 11:00:10 +0000
commitde0c470981ba60a2ba4d81aa3fb97ebdb91056ec (patch)
tree11e2c10ee326313ce121c8d22c22f485d69ff7a7 /modules/http2
parentb88117f6024f8675b848d55d0920230cab97ad46 (diff)
downloadhttpd-de0c470981ba60a2ba4d81aa3fb97ebdb91056ec.tar.gz
*) mod_http2: use proper apr_time_t where it is due, no (int) casting.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904299 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2')
-rw-r--r--modules/http2/h2_workers.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c
index b95c0fa84b..ac64f53b34 100644
--- a/modules/http2/h2_workers.c
+++ b/modules/http2/h2_workers.c
@@ -78,7 +78,7 @@ struct h2_workers {
apr_uint32_t max_slots;
apr_uint32_t min_active;
- volatile int idle_limit;
+ volatile apr_time_t idle_limit;
volatile int aborted;
volatile int shutdown;
int dynamic;
@@ -315,7 +315,7 @@ static void* APR_THREAD_FUNC slot_run(apr_thread_t *thread, void *wctx)
APR_RING_INSERT_TAIL(&workers->idle, slot, h2_slot, link);
++workers->idle_slots;
slot->is_idle = 1;
- if (slot->id >= workers->min_active && workers->idle_limit) {
+ if (slot->id >= workers->min_active && workers->idle_limit > 0) {
rv = apr_thread_cond_timedwait(slot->more_work, workers->lock,
workers->idle_limit);
if (APR_TIMEUP == rv) {
@@ -416,7 +416,8 @@ static apr_status_t workers_pool_cleanup(void *data)
}
h2_workers *h2_workers_create(server_rec *s, apr_pool_t *pchild,
- int max_slots, int min_active, apr_time_t idle_limit)
+ int max_slots, int min_active,
+ apr_time_t idle_limit)
{
apr_status_t rv;
h2_workers *workers;
@@ -453,7 +454,7 @@ h2_workers *h2_workers_create(server_rec *s, apr_pool_t *pchild,
workers->pool = pool;
workers->min_active = min_active;
workers->max_slots = max_slots;
- workers->idle_limit = (int)((idle_limit > 0)? idle_limit : apr_time_from_sec(10));
+ workers->idle_limit = (idle_limit > 0)? idle_limit : apr_time_from_sec(10);
workers->dynamic = (workers->min_active < workers->max_slots);
ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,