]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make sure %<tt includes all [failed] connection attempts.
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 29 Jun 2013 08:20:01 +0000 (02:20 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 29 Jun 2013 08:20:01 +0000 (02:20 -0600)
The old code was using zero n_tries to detect the first connection
attempt,
but n_tries is not incremented when we are opening a new connection
rather
than reusing an old one. Perhaps n_tries should be updated differently
as
well, but this change simply makes %<tt (hier.total_response_time)
management
independent from that [complex] counter.

src/forward.cc

index 295e6dfc57654fd482b42e3fe51fac91978ee4b1..5afce2b00ebdde20e26ce616eb64dc94565330c8 100644 (file)
@@ -935,7 +935,7 @@ FwdState::connectStart()
 
     debugs(17, 3, "fwdConnectStart: " << entry->url());
 
-    if (n_tries == 0) // first attempt
+    if (!request->hier.first_conn_start.tv_sec) // first attempt
         request->hier.first_conn_start = current_time;
 
     /* connection timeout */