fix: Fixes pooled timers orphaning each other (#809)
This commit is contained in:
parent
8e4d5bb169
commit
4893094bb4
7 changed files with 55 additions and 43 deletions
|
|
@ -113,6 +113,11 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
if (!timer.Running)
|
||||
{
|
||||
timer.OnDetach();
|
||||
}
|
||||
|
||||
timer = next;
|
||||
} while (timer != null);
|
||||
}
|
||||
|
|
@ -150,7 +155,7 @@ namespace Server
|
|||
private static void AddTimer(Timer timer, long delay)
|
||||
{
|
||||
#if DEBUG_TIMERS
|
||||
var originalDelay = delay
|
||||
var originalDelay = delay;
|
||||
#endif
|
||||
delay = Math.Max(0, delay);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue