From: Willy Tarreau Date: Thu, 25 Apr 2019 16:33:37 +0000 (+0200) Subject: BUG/MINOR: proto_http: properly reset the stream's call rate on keep-alive X-Git-Tag: v2.0-dev3~167 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e370daa52c3f0ae788a1fed8e805b4731943216;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/proto_http.c b/src/proto_http.c index 82292c11ba..5776a4784a 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 */