From b77c6b1f12f72d10977f1c17132b50bd405369ce Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sat, 22 Mar 2025 20:30:36 +0800 Subject: [PATCH] Added some more logging for debugging this. Check status for waiting for activation --- KfChatDotNetBot/Services/AlmanacShill.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Services/AlmanacShill.cs b/KfChatDotNetBot/Services/AlmanacShill.cs index b5a30cb..0dbf4fc 100644 --- a/KfChatDotNetBot/Services/AlmanacShill.cs +++ b/KfChatDotNetBot/Services/AlmanacShill.cs @@ -23,8 +23,11 @@ public class AlmanacShill(ChatBot kfChatBot) : IDisposable public bool IsShillTaskRunning() { + _logger.Info($"_almanacShillTask is null? {_almanacShillTask == null}"); if (_almanacShillTask == null) return false; - if (_almanacShillTask.Status != TaskStatus.Running) return false; + _logger.Info($"_almanacShillTask.Status is {_almanacShillTask.Status}"); + if (_almanacShillTask.Status is not (TaskStatus.Running or TaskStatus.WaitingForActivation)) return false; + _logger.Info($"_almanacShillCts.IsCancellationRequested is {_almanacShillCts.IsCancellationRequested}"); if (_almanacShillCts.IsCancellationRequested) return false; return true; }