]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] do not report queue time if not queued !
authorwilly tarreau <willy@wtap.(none)>
Sat, 13 May 2006 14:08:47 +0000 (16:08 +0200)
committerwilly tarreau <willy@wtap.(none)>
Sat, 13 May 2006 14:10:47 +0000 (16:10 +0200)
haproxy.c

index e51ae32f32b996600061f32191e76ba4cec2f5b9..8bec84b0638bdc06b519f15f9bc7f613d2da8357 100644 (file)
--- a/haproxy.c
+++ b/haproxy.c
@@ -4749,7 +4749,8 @@ int process_srv(struct session *t) {
                 c == CL_STSHUTW ||
                 (c == CL_STSHUTR && t->req->l == 0)) { /* give up */
            tv_eternity(&t->cnexpire);
-           t->logs.t_queue = tv_diff(&t->logs.tv_accept, &now);
+           if (t->pend_pos)
+               t->logs.t_queue = tv_diff(&t->logs.tv_accept, &now);
            srv_close_with_err(t, SN_ERR_CLICL, t->pend_pos ? SN_FINST_Q : SN_FINST_C, 0, 0, NULL);
 
            return 1;