summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Lallemand <wlallemand@haproxy.org>2021-11-10 10:57:18 +0100
committerWilliam Lallemand <wlallemand@haproxy.org>2021-11-10 15:53:01 +0100
commit3ba7c7b5e18e9adc38e54a9900f9b5cb7fbb0d0d (patch)
treea24cb38dba048b899bea970ef28d00d878f9a55e
parent68836740842f3f1cac833d974492a98cdeed0f16 (diff)
downloadhaproxy-3ba7c7b5e18e9adc38e54a9900f9b5cb7fbb0d0d.tar.gz
MINOR: mworker: ReloadFailed shown depending on failedreload
The ReloadFailed prompt in the master CLI is shown only when failedreloads > 0. It was previously using a check on the wait mode, but we always use the wait mode now.
-rw-r--r--src/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cli.c b/src/cli.c
index 36d11a4ac..ec5283f27 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -44,6 +44,7 @@
#include <haproxy/list.h>
#include <haproxy/listener.h>
#include <haproxy/log.h>
+#include <haproxy/mworker.h>
#include <haproxy/mworker-t.h>
#include <haproxy/pattern-t.h>
#include <haproxy/peers.h>
@@ -2067,7 +2068,7 @@ void pcli_write_prompt(struct stream *s)
} else {
if (s->pcli_next_pid == 0)
chunk_appendf(msg, "master%s> ",
- (global.mode & MODE_MWORKER_WAIT) ? "[ReloadFailed]" : "");
+ (proc_self->failedreloads > 0) ? "[ReloadFailed]" : "");
else
chunk_appendf(msg, "%d> ", s->pcli_next_pid);
}