From: Amos Jeffries Date: Tue, 21 Oct 2008 11:21:59 +0000 (+1300) Subject: Author: Alex Rousskov X-Git-Tag: SQUID_3_2_0_1~1389 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=279152e700f5946c936a321f23f1be13429e8af0;p=thirdparty%2Fsquid.git Author: Alex Rousskov 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. --- diff --git a/src/Server.cc b/src/Server.cc index 03443fb74c..606b6881e8 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -92,7 +92,7 @@ ServerStateData::swanSong() { // get rid of our piping obligations if (requestBodySource != NULL) - requestBodySource->clearConsumer(); + stopConsumingFrom(requestBodySource); #if USE_ADAPTATION cleanAdaptation(); diff --git a/src/client_side.cc b/src/client_side.cc index 789a1f2f82..ce6c34d7e9 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -651,10 +651,8 @@ ConnStateData::~ConnStateData() cbdataReferenceDone(port); - if (bodyPipe != NULL) { - bodyPipe->clearProducer(false); - bodyPipe = NULL; // refcounted - } + if (bodyPipe != NULL) + stopProducingFor(bodyPipe, false); } /**