mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 03:59:03 -04:00
Fix to prevent recursive call to DoBackgroundTimer
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3441 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
81761626d0
commit
413f775b89
@ -616,7 +616,22 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
|
||||
if (((TIME % 5) == 0) && (!expire_run))
|
||||
{
|
||||
expire_lines();
|
||||
if (process_module_sockets)
|
||||
{
|
||||
/* Fix by brain - the addition of DoOneIteration means that this
|
||||
* can end up getting called recursively in the following pattern:
|
||||
*
|
||||
* m_spanningtree DoPingChecks
|
||||
* (server pings out and is squit)
|
||||
* (squit causes call to DoOneIteration)
|
||||
* DoOneIteration enters here
|
||||
* calls DoBackground timer
|
||||
* enters m_spanningtree DoPingChecks... see step 1.
|
||||
*
|
||||
* This should do the job and fix the bug.
|
||||
*/
|
||||
FOREACH_MOD(I_OnBackgroundTimer,OnBackgroundTimer(TIME));
|
||||
}
|
||||
TickMissedTimers(TIME);
|
||||
expire_run = true;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user