diff --git a/IPBanCore/Core/IPBan/IPBanConfigReaderWriter.cs b/IPBanCore/Core/IPBan/IPBanConfigReaderWriter.cs index 58dbc761..cbf3093d 100644 --- a/IPBanCore/Core/IPBan/IPBanConfigReaderWriter.cs +++ b/IPBanCore/Core/IPBan/IPBanConfigReaderWriter.cs @@ -44,6 +44,7 @@ public class IPBanConfigReaderWriter private string localConfigString; private static string lastConfigValue; private static DateTime lastConfigWriteTime; + private static DateTime lastConfigIntervalTime; private static readonly TimeSpan forceLoadInterval = TimeSpan.FromMinutes(5.0); @@ -116,10 +117,11 @@ await Locker.LockActionAsync(async () => // if enough time has elapsed, force a reload anyway, in case of dns entries and the // like in the config that need to be re-resolved - IPBanService.UtcNow - lastWriteTime > forceLoadInterval) + IPBanService.UtcNow - lastConfigIntervalTime > forceLoadInterval) { lastConfigWriteTime = lastWriteTime; lastConfigValue = currentConfig; + lastConfigIntervalTime = IPBanService.UtcNow; result = currentConfig; } });