From 5e088e3f8ec2a93b33b4e412530b4321f16bd8de Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 22 May 2025 17:13:20 +0200 Subject: [PATCH] MINOR: server: use stress mode for "add server help" Implement stress mode on "add server help". This ensures that the command is fully reentrant on full output buffer. For testing, it requires compilation with USE_STRESS and global setting "stress-level 1". --- src/server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index afe228043..26cb50ebe 100644 --- a/src/server.c +++ b/src/server.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -5855,8 +5856,10 @@ int cli_io_handler_add_server(struct appctx *appctx) ctx->obj2 = kw; chunk_reset(&trash); chunk_printf(&trash, "%s\n", kw->kw); - if (applet_putchk(appctx, &trash) == -1) + if (STRESS_RUN1(applet_putchk_stress(appctx, &trash) == -1, + applet_putchk(appctx, &trash) == -1)) { goto full; + } } kwl = LIST_NEXT(&kwl->list, struct srv_kw_list *, list);