BUG/MINOR: trace: Test server existence for health-checks to get proxy

Email alerts are based on health-checks but with no server. Thus, in
__trace() function, responsible to write a trace message, we must be
prepared to have no server and thus no proxy.

This patch must be backported as far as 2.4.
This commit is contained in:
Christopher Faulet 2022-06-08 09:06:15 +02:00
parent 2d7cd3e4ca
commit e3b2574796
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ void __trace(enum trace_level level, uint64_t mask, struct trace_source *src,
}
if (check) {
srv = check->server;
be = srv->proxy;
be = (srv ? srv->proxy : NULL);
}
if (!srv && conn)