]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 21 Oct 2008 11:21:59 +0000 (00:21 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 21 Oct 2008 11:21:59 +0000 (00:21 +1300)
Bug 2492: assertion failed: Server.cc:70: "!requestBodySource"

swanSong should set the pipe to NULL after stopping
consumption. There is even a convenience/safety method to do both in one call.

The attached patch replaces raw pipe->stop*() calls with convenience/safety
wrappers.

src/Server.cc
src/client_side.cc

index 03443fb74c45935e60e584cfa0df13ac6ca86ed4..606b6881e8e96c6590283a0295f166d3594a76cc 100644 (file)
@@ -92,7 +92,7 @@ ServerStateData::swanSong()
 {
     // get rid of our piping obligations
     if (requestBodySource != NULL)
-        requestBodySource->clearConsumer();
+        stopConsumingFrom(requestBodySource);
 
 #if USE_ADAPTATION
     cleanAdaptation();
index 789a1f2f82355775e1b2fa3becf7bc1fe28931dc..ce6c34d7e9a64f868a6b1de36f7b87af8b3a8469 100644 (file)
@@ -651,10 +651,8 @@ ConnStateData::~ConnStateData()
 
     cbdataReferenceDone(port);
 
-    if (bodyPipe != NULL) {
-        bodyPipe->clearProducer(false);
-        bodyPipe = NULL; // refcounted
-    }
+    if (bodyPipe != NULL)
+        stopProducingFor(bodyPipe, false);
 }
 
 /**