From 2eac11f53518e4798793eeefea0b294f50624165 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 28 Jul 2024 15:55:05 -0700 Subject: [PATCH] fix: Reverts timer change in Detach (#1892) --- Projects/Server/Timer/Timer.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Projects/Server/Timer/Timer.cs b/Projects/Server/Timer/Timer.cs index f9e6efe3c..3919db6a3 100644 --- a/Projects/Server/Timer/Timer.cs +++ b/Projects/Server/Timer/Timer.cs @@ -153,6 +153,18 @@ public partial class Timer Running = false; + // We are the head on the timer ring + if (_rings[_ring][_slot] == this) + { + _rings[_ring][_slot] = _nextTimer; + } + + // We are the head on the executing ring + if (_executingRings[_ring] == this) + { + _executingRings[_ring] = _nextTimer; + } + Detach(); OnDetach(); @@ -200,18 +212,6 @@ public partial class Timer private void Detach() { - // We are the head on the timer ring - if (_rings[_ring][_slot] == this) - { - _rings[_ring][_slot] = _nextTimer; - } - - // We are the head on the executing ring - if (_executingRings[_ring] == this) - { - _executingRings[_ring] = _nextTimer; - } - if (_prevTimer != null) { _prevTimer._nextTimer = _nextTimer;