]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Official code forgot to start the BodySink job
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 10 Aug 2021 19:40:35 +0000 (15:40 -0400)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 10 Aug 2021 19:40:35 +0000 (15:40 -0400)
The code probably worked fine because BodySink::start() does nothing
as the job is a passive consumer.

Discovered due to the new started_ assertion in AsyncJob::callEnd().

src/BodyPipe.cc

index 012ecb984a233b9cd8ac100aaea7e4871d38b142..96c78e11f14f1b6684820028a268b83eedf84d39 100644 (file)
@@ -335,6 +335,7 @@ BodyPipe::startAutoConsumptionIfNeeded()
         return;
 
     theConsumer = new BodySink(this);
+    AsyncJob::Start(theConsumer);
     debugs(91,7, HERE << "starting auto consumption" << status());
     scheduleBodyDataNotification();
 }