From: Willy Tarreau Date: Tue, 4 Sep 2018 17:21:44 +0000 (+0200) Subject: MINOR: log: don't check the stream-int's conn_retries if the stream is NULL X-Git-Tag: v1.9-dev2~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abd71a5c2e45c13fc80b0d3860c0971c92652b02;p=thirdparty%2Fhaproxy.git MINOR: log: don't check the stream-int's conn_retries if the stream is NULL Let's simply forget the conn_retries when there is no stream since we haven't tried to connect yet. --- diff --git a/src/log.c b/src/log.c index 7ac555d079..19b448f3cb 100644 --- a/src/log.c +++ b/src/log.c @@ -2121,7 +2121,7 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t case LOG_FMT_RETRIES: // %rq if (s->flags & SF_REDISP) LOGCHAR('+'); - ret = ltoa_o((s->si[1].conn_retries>0) ? + ret = ltoa_o((s && s->si[1].conn_retries > 0) ? (be->conn_retries - s->si[1].conn_retries) : be->conn_retries, tmplog, dst + maxsize - tmplog); if (ret == NULL)