From ad8f356fc1678a8ad84cfc9d02af436f6ba288c0 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Sun, 2 Feb 2025 01:57:08 +0300 Subject: [PATCH] fix: get non negative number --- .../Configuration/Core/BackgroundTasks/ScheduleSyncService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs b/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs index 9c57870..a2896f8 100644 --- a/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs +++ b/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs @@ -82,7 +82,7 @@ public class ScheduleSyncService : IHostedService, IDisposable delay = 1; _cancellationTokenSource = new CancellationTokenSource(); - _timer = new Timer(ExecuteTask, null, (long)delay, Timeout.Infinite); + _timer = new Timer(ExecuteTask, null, Math.Abs((long)delay), Timeout.Infinite); } private async void ExecuteTask(object? state)