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
|
|
@ -50,9 +50,12 @@ namespace Server
|
|||
|
||||
public void Cancel()
|
||||
{
|
||||
_timer?.Stop();
|
||||
_timer?.Return();
|
||||
_timer = null;
|
||||
if (_timer != null)
|
||||
{
|
||||
_timer._returnOnDetach = true;
|
||||
_timer?.Stop();
|
||||
_timer = null;
|
||||
}
|
||||
|
||||
this = default;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue