From: Alex Rousskov Date: Wed, 14 Jul 2021 20:30:19 +0000 (-0400) Subject: Simplified Downloader (positive) termination condition X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a6e098325fde4645fc4ffd7b3a88f42689a2ca2;p=thirdparty%2Fsquid.git 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). --- 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