From 269826b70fdf8d1b09402eab40af60074ac74f0a Mon Sep 17 00:00:00 2001 From: ruberoid Date: Wed, 14 May 2025 09:59:14 +0400 Subject: [PATCH] fix time limit compare issue. --- .../UpdateListeners/UpdateListenerBackgroundService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs b/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs index 8a22c16..dc01f2d 100644 --- a/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs +++ b/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs @@ -37,7 +37,7 @@ public sealed class UpdateListenerBackgroundService : BackgroundService Client? client = null; while (!stoppingToken.IsCancellationRequested) { - if (DateTimeOffset.UtcNow - TimeSpan.FromHours(2) < _activityStartTime) + if (DateTimeOffset.UtcNow - TimeSpan.FromHours(2) > _activityStartTime) { _logger.LogInformation("Timeout exceed."); _activityStartTime = DateTimeOffset.UtcNow;