]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Simplified Downloader (positive) termination condition
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 14 Jul 2021 20:30:19 +0000 (16:30 -0400)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 16 Jul 2021 17:33:09 +0000 (13:33 -0400)
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

index 4bfb7f5b459d7c140f81246a465184f0644edfc0..c53168aa4795d55317e9728c225130f4e2c66146 100644 (file)
@@ -94,7 +94,7 @@ Downloader::swanSong()
 bool
 Downloader::doneAll() const
 {
-    return (!callback_ || callback_->canceled()) && AsyncJob::doneAll();
+    return !callback_;
 }
 
 static void