[squid-dev] [PATCH] Some failed transactions are not logged

Alex Rousskov rousskov at measurement-factory.com
Thu Jul 21 16:52:21 UTC 2016


On 07/20/2016 05:27 PM, Eduard Bagdasaryan wrote:

> We do not have a 'getter' for receivedFirstByte_. It easy to add it
> of course, but I assume the current receivedFirstByte() should be
> refactored then

and renamed. Adding a getter is not going to be easy, is outside your
project scope, and is not really needed in the current code. The change
request itself was wrong given the current code state.


> void
> ConnStateData::receivedFirstByte(bool on)
> {
>     if (on == receivedFirstByte_)
>         return;
>     receivedFirstByte_ = on;
>     if (!receivedFirstByte_)
>         return;
>     // Set timeout to Config.Timeout.request
>     typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams>
> TimeoutDialer;
>     AsyncCall::Pointer timeoutCall =  JobCallback(33, 5,
>                                       TimeoutDialer, this,
> ConnStateData::requestTimeout);
>     commSetConnTimeout(clientConnection, Config.Timeout.request,
> timeoutCall);
> }
> 
> Then go through the code and use this new method instead of
> receivedFirstByte_ assignment. Do we need all this?

Definitely not this monster!


Thank you,

Alex.



More information about the squid-dev mailing list