On 9/13/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
On 13.09.2006, at 04:55, Vlad Seryakov wrote: > Had ns_proxy running, typed in nscp ns_shutdown and nsd crahsed Eh... this is true. In the attempt to cleanup as much as possible I prematurely cleaned a pool having references to it. Actually, pools still having references to them should not be touched and should rather leak. OTOH, at the shutdown, there should be no references as all threads should have already been exited. I guess at this point we have still some trouble... The immediate and not clean solution is just to skip such pools and let them leak. I'm emitting the log message in such case as the reminder: [13/Sep/2006:10:22:37][1132.2684415384][-main-] Warning: nsproxy: pool "test" not destroyed, has 1 active slaves I do not think it is possible to avoid this, after thinking about this for a while. But still, lets leave this here as we might be more clever in the future.
Currently you're cleaning up with a AtExit handler and manually calculating a timeout to wait for proxies to exit. I think you really want an AtShutdown callback. These already handle a notification and then timeout sequence. I think at the moment a clean exit will take shutdown-timeout + proxy-shutdown-timeout, which might be surprising to people.