the producer that the consumer has aborted.
This change increases the risk that, due to bugs, no [other]
consumer will come and the producer will get stuck waiting for
the buffer space. However, this risk should be mitigated by
timeouts because no amount of code can ensure eventual consumer
presence if producer and consumer are asynchronous.
This change was needed to support ICAP transaction retries.
When a transaction aborts due to pconn race conditions, without
consuming body buffer, the second transaction will start from
scratch and become the body consumer.
if (theConsumer) {
debugs(91,7, HERE << "clearing consumer" << status());
theConsumer = NULL;
- if (!exhausted())
+ if (consumedSize() && !exhausted())
AsyncCall(91,5, this, BodyPipe::tellBodyConsumerAborted);
}
}