Am 25.01.2017 um 10:46 schrieb Stefan Eissing: > Thanks Yann! > > Stefan: here is the patch as committed to trunk:
Up and running. Will report back. > > > Cheers, Stefan > >> Am 25.01.2017 um 01:41 schrieb Yann Ylavic <[email protected]>: >> >> Hi Stefan, >> >> On Tue, Jan 24, 2017 at 1:37 PM, Stefan Eissing >> <[email protected]> wrote: >>> Yann, thanks for the patch. I agree that the cleanups need to be killed in >>> the right place. Not certain if it was wrong before, but that part is not >>> easy to see for every combination. >>> >>> I did some rework and hope this makes it more readable. If you find the >>> time to look at it, feedback welcome. >> >> I still fear that if beam->pool gets destroyed while both >> beam_send_cleanup() and beam_cleanup() are registered, the former is >> called twice. >> >> I'd change: >> if (safe_send) { >> if (beam->send_pool && beam->send_pool != beam->pool) { >> apr_pool_cleanup_kill(beam->send_pool, beam, beam_send_cleanup); >> } >> status = beam_send_cleanup(beam); >> } >> >> with: >> if (safe_send) { >> if (beam->send_pool) { >> if (beam->send_pool != beam->pool) { >> apr_pool_cleanup_kill(beam->send_pool, beam, >> beam_send_cleanup); >> } >> status = beam_send_cleanup(beam); >> } >> } >> >> since in the above case beam_send_cleanup is run first and sets >> send_pool=NULL. >> >> Attached v3 with this only change w.r.t. v2. >> Otherwise, looks good to me, thanks! >> <h2_beams_cleanup_v3.diff> > > Stefan Eissing > > <green/>bytes GmbH > Hafenstrasse 16 > 48155 Münster > www.greenbytes.de >
