]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 18 Sep 2010 12:39:09 +0000 (06:39 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 18 Sep 2010 12:39:09 +0000 (06:39 -0600)
Removed erroneous !theEntries.empty() Must() in Adaptation::History.

The "we need history" state of the retried transaction may be different from
that of the original one due to reconfigurations, routing responses, etc.

Based on lp 3p1-rock branch, r9622.

src/adaptation/History.cc

index 4733b5aef3e77ec1cea67428c328eab92f23b0ca..a43c09be18a7f87dacc111b6eebcd0f6dc314876 100644 (file)
@@ -39,10 +39,10 @@ Adaptation::History::History(): theNextServices(TheNullServices)
 
 int Adaptation::History::recordXactStart(const String &serviceId, const timeval &when, bool retrying)
 {
-    if (retrying) {
-        Must(!theEntries.empty()); // or there would be nothing to retry
+    // the history will be empty on retries if it was enabled after the failure
+    if (retrying && !theEntries.empty())
         theEntries.back().retried = true;
-    }
+
     theEntries.push_back(Adaptation::History::Entry(serviceId, when));
     return theEntries.size() - 1; // record position becomes history ID
 }