CLEANUP: task: remove all initializations to TICK_ETERNITY after task_new()
This is now guaranteed by design, simply remove these unneeded parts to
avoid confusion.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index ecd4c9f..8b6aec6 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -9058,10 +9058,6 @@
if (curproxy->task) {
curproxy->task->context = curproxy;
curproxy->task->process = manage_proxy;
- /* no need to queue, it will be done automatically if some
- * listener gets limited.
- */
- curproxy->task->expire = TICK_ETERNITY;
} else {
Alert("Proxy '%s': no more memory when trying to allocate the management task\n",
curproxy->id);
diff --git a/src/checks.c b/src/checks.c
index 1af862e..7938b87 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -2275,7 +2275,6 @@
s->warmup = t;
t->process = server_warmup;
t->context = s;
- t->expire = TICK_ETERNITY;
/* server can be in this state only because of */
if (s->state == SRV_ST_STARTING)
task_schedule(s->warmup, tick_add(now_ms, MS_TO_TICKS(MAX(1000, (now.tv_sec - s->last_change)) / 20)));
diff --git a/src/dns.c b/src/dns.c
index 78ee62b..221f870 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -1421,7 +1421,6 @@
/* update task's parameters */
t->process = dns_process_resolve;
t->context = curr_resolvers;
- t->expire = 0;
/* no need to keep the new task if one is already affected to our resolvers
* section */
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index e59922c..5d57447 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1918,7 +1918,6 @@
SPOE_APPCTX(appctx)->owner = appctx;
SPOE_APPCTX(appctx)->task->process = spoe_process_appctx;
- SPOE_APPCTX(appctx)->task->expire = TICK_ETERNITY;
SPOE_APPCTX(appctx)->task->context = appctx;
SPOE_APPCTX(appctx)->agent = conf->agent;
SPOE_APPCTX(appctx)->version = 0;
diff --git a/src/haproxy.c b/src/haproxy.c
index 7af1092..52722db 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1474,7 +1474,6 @@
/* very simple initialization, users will queue the task if needed */
global_listener_queue_task->context = NULL; /* not even a context! */
global_listener_queue_task->process = manage_global_listener_queue;
- global_listener_queue_task->expire = TICK_ETERNITY;
/* now we know the buffer size, we can initialize the channels and buffers */
init_buffer();
diff --git a/src/peers.c b/src/peers.c
index f176d24..7bf7766 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -2074,7 +2074,6 @@
listener->maxconn = peers->peers_fe->maxconn;
peers->sync_task = task_new();
peers->sync_task->process = process_peer_sync;
- peers->sync_task->expire = TICK_ETERNITY;
peers->sync_task->context = (void *)peers;
peers->sighandler = signal_register_task(0, peers->sync_task, 0);
task_wakeup(peers->sync_task, TASK_WOKEN_INIT);
diff --git a/src/stick_table.c b/src/stick_table.c
index 8cc7dd2..a00f1b6 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -437,7 +437,6 @@
if ( t->expire ) {
t->exp_task = task_new();
t->exp_task->process = process_table_expire;
- t->exp_task->expire = TICK_ETERNITY;
t->exp_task->context = (void *)t;
}
if (t->peers.p && t->peers.p->peers_fe && t->peers.p->peers_fe->state != PR_STSTOPPED) {