[NeoStats-Devel] Watch where you call do_exit....

"M" <[email protected]>
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
NeoStats has a long history of entering an infinite loop when a socket error
occurs. This is usually down to calls to do_exit. I have fixed this many
times in 2.5.x and fixed it once and for all in 3.0 by removing all the
unecessary do_exit calls and checking for the socket error in the top level
loop. However, the new libevent system reintroduced the problem as I
discovered tonight. 

Please never call do_exit from **any** code without checking the error
condition that will cause it to be called to avoid the infinite loop. Socket
errors are detected within the main neostats loop so NeoStats knows to exit
without socket calls making a further attempt to determine the error and
call the exit routine. Any other failures reported up through the function
hierarchy will similarly cause NeoStats to exit. do_exit bypasses most of
the loop checks so should not be considered a call at will function. 

I have added a flag to do_exit which will create a log entry when a
recursive exit attempt is made. It should never be necessary to do this and
if this ever triggers, it is a bug we need to address.

Mark.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.