]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: applet: always use task_new_on() on applet creation
authorWilly Tarreau <w@1wt.eu>
Wed, 15 Jun 2022 14:40:58 +0000 (16:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:14 +0000 (19:15 +0200)
Now that task_new_on() supports negative numbers, there's no need for
checking the thread value nor falling back to task_new_anywhere().

src/applet.c

index 47263bcd5cf2b5dcfba2311f574bb8e04d5a5ac1..41ad2fc3dd4a7a6e0d64812720dabf7cb6a1d30c 100644 (file)
@@ -57,11 +57,7 @@ struct appctx *appctx_new_on(struct applet *applet, struct sedesc *sedesc, int t
        }
        appctx->sedesc = sedesc;
 
-       if (thr >= 0)
-               appctx->t = task_new_on(thr);
-       else
-               appctx->t = task_new_anywhere();
-
+       appctx->t = task_new_on(thr);
        if (unlikely(!appctx->t))
                goto fail_task;
        appctx->t->process = task_run_applet;