From: Willy Tarreau Date: Mon, 1 Jul 2013 16:07:03 +0000 (+0200) Subject: BUG: counters: third counter was not stored if others unset X-Git-Tag: v1.5-dev20~338 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7af7d5957d04e8160a4e4e4eb6049c056ec06097;p=thirdparty%2Fhaproxy.git BUG: counters: third counter was not stored if others unset Commit e25c917a introduced a third tracking counter bug forgot to check it when storing values at the end of the session. The impact is that if neither the first nor the second one are changed, none of them are saved. --- diff --git a/src/session.c b/src/session.c index ec26522f69..3f117e6df0 100644 --- a/src/session.c +++ b/src/session.c @@ -312,8 +312,7 @@ static void kill_mini_session(struct session *s) conn_full_close(s->si[0].conn); s->fe->feconn--; - if (s->stkctr[0].entry || s->stkctr[1].entry) - session_store_counters(s); + session_store_counters(s); if (!(s->listener->options & LI_O_UNLIMITED)) actconn--; @@ -649,8 +648,7 @@ static void session_free(struct session *s) pool_free2(fe->req_cap_pool, txn->req.cap); } - if (s->stkctr[0].entry || s->stkctr[1].entry) - session_store_counters(s); + session_store_counters(s); list_for_each_entry_safe(bref, back, &s->back_refs, users) { /* we have to unlink all watchers. We must not relink them if