/*
- * 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.
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