From 5e370daa52c3f0ae788a1fed8e805b4731943216 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 25 Apr 2019 18:33:37 +0200 Subject: [PATCH] BUG/MINOR: proto_http: properly reset the stream's call rate on keep-alive The stream's call rate measurement was added by commit 2e9c1d296 ("MINOR: stream: measure and report a stream's call rate in "show sess"") but it forgot to reset it in case of HTTP keep-alive (legacy mode), resulting in incorrect measurements. No backport is needed, unless the patch above is backported. --- src/proto_http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/proto_http.c b/src/proto_http.c index 82292c11b..5776a4784 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3450,6 +3450,7 @@ void http_end_txn_clean_session(struct stream *s) s->task->cpu_time = 0; s->task->lat_time = 0; s->task->call_date = ((profiling & HA_PROF_TASKS_MASK) >= HA_PROF_TASKS_AUTO) ? now_mono_time() : 0; + s->call_rate.curr_sec = s->call_rate.curr_ctr = s->call_rate.prev_ctr = 0; s->logs.accept_date = date; /* user-visible date for logging */ s->logs.tv_accept = now; /* corrected date for internal use */