mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
MINOR: filters: Call stream_set_backend callbacks before updating backend stats
So if an internal error is returned, the number of cumulated connections on the backend is not incremented.
This commit is contained in:
parent
9adb0a5458
commit
4117904ffd
@ -1131,15 +1131,16 @@ int stream_set_backend(struct stream *s, struct proxy *be)
|
|||||||
{
|
{
|
||||||
if (s->flags & SF_BE_ASSIGNED)
|
if (s->flags & SF_BE_ASSIGNED)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (flt_set_stream_backend(s, be) < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
s->be = be;
|
s->be = be;
|
||||||
be->beconn++;
|
be->beconn++;
|
||||||
if (be->beconn > be->be_counters.conn_max)
|
if (be->beconn > be->be_counters.conn_max)
|
||||||
be->be_counters.conn_max = be->beconn;
|
be->be_counters.conn_max = be->beconn;
|
||||||
proxy_inc_be_ctr(be);
|
proxy_inc_be_ctr(be);
|
||||||
|
|
||||||
if (flt_set_stream_backend(s, be) < 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* assign new parameters to the stream from the new backend */
|
/* assign new parameters to the stream from the new backend */
|
||||||
s->si[1].flags &= ~SI_FL_INDEP_STR;
|
s->si[1].flags &= ~SI_FL_INDEP_STR;
|
||||||
if (be->options2 & PR_O2_INDEPSTR)
|
if (be->options2 & PR_O2_INDEPSTR)
|
||||||
|
Loading…
Reference in New Issue
Block a user