[squid-dev] [PATCH] Some failed transactions are not logged
Eduard Bagdasaryan
eduard.bagdasaryan at measurement-factory.com
Wed Jul 20 23:27:54 UTC 2016
2016-07-20 18:23 GMT+03:00 Alex Rousskov <rousskov at measurement-factory.com>:
> On 07/20/2016 09:06 AM, Amos Jeffries wrote:
> > On 21/07/2016 2:44 a.m., Eduard Bagdasaryan wrote:
> >> Amos,
> >> just to clarify: any more touches from my side?
>
> > There are the bits where Alex and I agreed on a change. I think
that was
> > all cosmetic documentation stuff.
>
> In summary:
>
> 1. Rename the error URL to "error:accept-client-connection".
> 2. Adjust the source code comments using the "Given the new condition, I
> would do" sketch.
> 3. Use the getter method for receivedFirstByte_.
Updated the patch with first two changes. 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, adding a 'bool' parameter,
smth. like:
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?
BTW, in server.cc "if" check is redundant:
if (!receivedFirstByte_)
receivedFirstByte();
Eduard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-170-some-failed-transactions-not-logged-t8.patch
Type: text/x-patch
Size: 25285 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20160721/b2146b96/attachment-0001.bin>
More information about the squid-dev
mailing list