]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/Pipeline.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / Pipeline.cc
index b3b3290471f1e09cf095897f2bf1545820dacd54..03e99f6542e1ea3530f69acc01c1fff3e5a99bf9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -36,16 +36,16 @@ Pipeline::front() const
     return requests.front();
 }
 
-void
-Pipeline::terminateAll(int xerrno)
+Http::StreamPointer
+Pipeline::back() const
 {
-    while (!requests.empty()) {
-        Http::StreamPointer context = requests.front();
-        debugs(33, 3, "Pipeline " << (void*)this << " notify(" << xerrno << ") " << context);
-        context->noteIoError(xerrno);
-        context->finished();  // cleanup and self-deregister
-        assert(context != requests.front());
+    if (requests.empty()) {
+        debugs(33, 3, "Pipeline " << (void*)this << " empty");
+        return Http::StreamPointer();
     }
+
+    debugs(33, 3, "Pipeline " << (void*)this << " back " << requests.back());
+    return requests.back();
 }
 
 void