From: Alex Rousskov Date: Sun, 12 Sep 2010 22:28:31 +0000 (-0600) Subject: Removed erroneous !theEntries.empty() Must() in Adaptation::History. X-Git-Tag: take1~268 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5d02c496cd3458e321345d9f2967b6a62856f7a;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/adaptation/History.cc b/src/adaptation/History.cc index 3ecd4d3780..3eda70b91a 100644 --- a/src/adaptation/History.cc +++ b/src/adaptation/History.cc @@ -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 }