BUG/MINOR: counters: do not untrack counters before logging

Baptiste Assmann reported a corner case in the releasing of stick-counters:
we release content-aware counters before logging. In the past it was not a
problem, but since now we can log them it, it prevents one from logging
their value. Simply switching the log production and the release of the
counter fixes the issue.

This should be backported into 1.5.
This commit is contained in:
Willy Tarreau 2014-06-25 15:36:04 +02:00
parent 0abf836ecb
commit d713bcc326

View File

@ -4808,7 +4808,6 @@ void http_end_txn_clean_session(struct session *s)
s->logs.t_close = tv_ms_elapsed(&s->logs.tv_accept, &now);
session_process_counters(s);
session_stop_content_counters(s);
if (s->txn.status) {
int n;
@ -4842,6 +4841,8 @@ void http_end_txn_clean_session(struct session *s)
s->do_log(s);
}
/* stop tracking content-based counters */
session_stop_content_counters(s);
session_update_time_stats(s);
s->logs.accept_date = date; /* user-visible date for logging */