From b2b4c809f816e618d67ad99f04e0359d4172e1cd Mon Sep 17 00:00:00 2001 From: jkachhad Date: Sun, 3 Apr 2022 00:00:01 -0700 Subject: [PATCH] fix: Properly count timers for DumpInfo (#986) --- Projects/Server/Timer/Timer.TimerWheel.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Projects/Server/Timer/Timer.TimerWheel.cs b/Projects/Server/Timer/Timer.TimerWheel.cs index 02b54f12a..e3dc9ae6c 100644 --- a/Projects/Server/Timer/Timer.TimerWheel.cs +++ b/Projects/Server/Timer/Timer.TimerWheel.cs @@ -221,12 +221,17 @@ namespace Server continue; } - var name = t.ToString(); - - hash.TryGetValue(name, out var count); - hash[name] = count + 1; - - total++; + while (t != null) + { + var name = t.ToString(); + + hash.TryGetValue(name, out var count); + hash[name] = count + 1; + + total++; + + t = t?._nextTimer; + } } }