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 ec26522..3f117e6 100644
--- a/src/session.c
+++ b/src/session.c
@@ -312,8 +312,7 @@
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 @@
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