From 4a6e098325fde4645fc4ffd7b3a88f42689a2ca2 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Wed, 14 Jul 2021 16:30:19 -0400 Subject: [PATCH] Simplified Downloader (positive) termination condition With JobWait API used by the callers, we no longer need to rely on some unrelated async job call noticing the callback cancellation. We are now guaranteed to receive a noteAbort() call. I also removed a call to always-true parent doneAll() because no other job, not even a parent's job can force Downloader to keep running -- if we have notified the requestor, we are done! Squid code is not consistent in application of that principle (yet). --- src/Downloader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Downloader.cc b/src/Downloader.cc index 4bfb7f5b45..c53168aa47 100644 --- a/src/Downloader.cc +++ b/src/Downloader.cc @@ -94,7 +94,7 @@ Downloader::swanSong() bool Downloader::doneAll() const { - return (!callback_ || callback_->canceled()) && AsyncJob::doneAll(); + return !callback_; } static void -- 2.47.2