From 4acdc5c4238af79d50de9846ea90782238b6bc70 Mon Sep 17 00:00:00 2001 From: Peter Csajtai Date: Thu, 3 Mar 2022 22:00:41 +0100 Subject: [PATCH] Fix autopoll wait time --- src/ConfigCatClient/ConfigService/AutoPollConfigService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConfigCatClient/ConfigService/AutoPollConfigService.cs b/src/ConfigCatClient/ConfigService/AutoPollConfigService.cs index 60a21d72..7dbf125e 100644 --- a/src/ConfigCatClient/ConfigService/AutoPollConfigService.cs +++ b/src/ConfigCatClient/ConfigService/AutoPollConfigService.cs @@ -140,7 +140,7 @@ private void StartScheduler(TimeSpan interval) var realNextTime = scheduledNextTime.Subtract(DateTimeOffset.UtcNow); if (realNextTime > TimeSpan.Zero) { - await Task.Delay(interval, this.timerCancellationTokenSource.Token); + await Task.Delay(realNextTime, this.timerCancellationTokenSource.Token); } } }