]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: task: remove all initializations to TICK_ETERNITY after task_new()
authorWilly Tarreau <w@1wt.eu>
Mon, 24 Jul 2017 15:55:20 +0000 (17:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 24 Jul 2017 15:55:20 +0000 (17:55 +0200)
This is now guaranteed by design, simply remove these unneeded parts to
avoid confusion.

src/cfgparse.c
src/checks.c
src/dns.c
src/flt_spoe.c
src/haproxy.c
src/peers.c
src/stick_table.c

index ecd4c9f3af83d3eeb7ff1d01a99c7f50ad0278f2..8b6aec6a447cc0123ec24739b5896b8de8c93b6a 100644 (file)
@@ -9058,10 +9058,6 @@ out_uri_auth_compat:
                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);
index 1af862e9b7d9ad35b794af48c2c729819295c424..7938b873021c31b7bb3ba21c1287e2b0308fa8b0 100644 (file)
@@ -2275,7 +2275,6 @@ static int start_checks()
                                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)));
index 78ee62bcc8421361b1c928fc1ae6a02f371054b6..221f87099c3271169d6897d104702cdafa39f13a 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -1421,7 +1421,6 @@ int dns_init_resolvers(int close_socket)
                /* 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 */
index e59922cf8238fc3b4581f6cc0fdb39a75ec9593d..5d57447773d305bee2fe34f2c6220bbe2201d061 100644 (file)
@@ -1918,7 +1918,6 @@ spoe_create_appctx(struct spoe_config *conf)
 
        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;
index 7af1092d9396bf2a601ec78287dd0fa8bba92b1c..52722db85503d10fd7da6013adabe5b955248ef1 100644 (file)
@@ -1474,7 +1474,6 @@ static void init(int argc, char **argv)
        /* 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();
index f176d2441883970ebc2a4da33ab9fc14cdfad863..7bf7766ea25a04861e88387f6f97a8fa5ba9aff1 100644 (file)
@@ -2074,7 +2074,6 @@ void peers_init_sync(struct peers *peers)
                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);
index 8cc7dd20b4a35e28aa59f7422256583399579503..a00f1b64586da90361880398c84dc7dde5e0e3f3 100644 (file)
@@ -437,7 +437,6 @@ int stktable_init(struct stktable *t)
                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) {