projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adbce8e
)
MINOR: cli: can't connect to the target CLI
author
William Lallemand
<wlallemand@haproxy.com>
Tue, 6 Nov 2018 16:37:11 +0000
(17:37 +0100)
committer
Willy Tarreau
<w@1wt.eu>
Tue, 6 Nov 2018 17:28:33 +0000
(18:28 +0100)
Return an error and quit if the CLI proxy is not able to connect to a
target.
src/cli.c
patch
|
blob
|
history
diff --git
a/src/cli.c
b/src/cli.c
index
999e4c0
..
32eaf46
100644
(file)
--- a/
src/cli.c
+++ b/
src/cli.c
@@
-1926,6
+1926,11
@@
int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
struct proxy *fe = strm_fe(s);
struct proxy *be = s->be;
+ if (rep->flags & CF_READ_ERROR) {
+ pcli_reply_and_close(s, "Can't connect to the target CLI!\n");
+ s->res.analysers &= ~AN_RES_WAIT_CLI;
+ return 0;
+ }
rep->flags |= CF_READ_DONTWAIT; /* try to get back here ASAP */
rep->flags |= CF_NEVER_WAIT;