On Tuesday 18 September 2001 02:10 am, Greg Stein wrote:
> On Mon, Sep 17, 2001 at 03:52:21PM -0700, Jon Travis wrote:
> > I've got a bit of code that needs to run after a connection to a client
> > has been closed.  Right now I can (kind of) spoof this by setting the
> > keepalive for the client to 0, and registering a cleanup on the
> > request_req pool.  Unfortunately the code in there is somewhat bulky,
> > so any subsequent cleanups that it registers will never get called
> > (apparently registering a cleanup within a cleanup no workie).
> >
> > I'd like to propose a new hook which gets run after connection to
> > the client has been closed.  (in my case, I run some cleanup code
> > which can take a while, and would like the client to be on its way).
> >
> > Any thoughts?
>
> Yes. :-)
>
> You've confused the issue with your subject line (everybody is bugging out
> because they're relating it to logging). It should not have anything to do
> with "log". We have a pre-connection hook, so call yours post-connection.
> That is when you want to run the hook, so we're all set.

Actually, that isn't why I am "bugging out".  I don't think we need the hook.
In the past, we had a child_exit hook, because we also had a child_init hook.
However, the entire group thought that was a hack, because the cleanest way
to do child_exit, is to register a cleanup.

Same thing here.  Whenever we have wanted to do something after a
particular event, then we register a cleanup for it, and let the pool logic handle
running it at the correct time.  The bug here, is that we can't register a cleanup
from within a cleanup.  Perhaps we should fix that bug, and leave this as a 
pool cleanup.

Ryan

______________________________________________________________
Ryan Bloom                              [EMAIL PROTECTED]
Covalent Technologies                   [EMAIL PROTECTED]
--------------------------------------------------------------

Reply via email to