]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make sure %<tt includes all [failed] connection attempts.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 18 Jun 2013 22:30:39 +0000 (16:30 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 18 Jun 2013 22:30:39 +0000 (16:30 -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/FwdState.cc

index 210fea6084aba019d70685f491bcd00fe6dbe526..06a53503162007dec4aa9f9b13f928fafd6a3020 100644 (file)
@@ -1079,7 +1079,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 */