Re: [PATCH] Move timeout handling from ConnOpener::connect to ConnOpener::timeout

From: Rainer Weikusat <rweikusat_at_mobileactivedefense.com>
Date: Fri, 18 Jan 2013 23:36:35 +0000

Amos Jeffries <squid3_at_treenet.co.nz> writes:

[...]

>>>> + ptr = static_cast<Pointer *>(F->write_data);
>>>> + delete ptr;
>>> This is not going to work well. F->write_data now points to deleted
>>> memory. If you absolutely have to do this, please set it to NULL after
>>> delete.
>> Insofar my understanding goes, the
>>
>> Comm::SetSelect(temporaryFd_, COMM_SELECT_WRITE, NULL, NULL, 0);
>>
>> in doneConnecting will do that (and - for good measure - the fd_close
>> called from doneConnecting will clear the write pointers again).
>
> Yes, but the SetSelect needs to be kept paired close to the fiddling
> with write_data. This is a hack, polishing it now is not a good
> idea. The purpose of it is to keep the write handler state
> consistent. Be conservative with the hack/workaround and don't depend
> on all other code behaviour remaining the same indefinitely.

I'm going to update this accordingly but this won't happen before
Sunday --- I've been busy with fixing bugs in other code which
repeatedly hit important customers and database log analysis in order
to get to the bottom serious performance issues affecting the same
customers since I wrote the two mails yesterday and couldn't really do
anything with this code because of that.
Received on Fri Jan 18 2013 - 23:36:48 MST

This archive was generated by hypermail 2.2.0 : Sat Jan 19 2013 - 12:00:09 MST