mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
MINOR: cli: can't connect to the target CLI
Return an error and quit if the CLI proxy is not able to connect to a target.
This commit is contained in:
parent
adbce8e0dd
commit
6b7cd0a72b
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue