mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-29 13:00:35 +00:00
WebServiceSettingsApi: updated ResporeSettingsAsync() to fix issue of not loading block list when update interval is set to 0.
This commit is contained in:
@@ -1550,14 +1550,13 @@ namespace DnsServerCore
|
||||
//reload settings and block list zone
|
||||
_dnsWebService.LoadConfigFile();
|
||||
|
||||
if ((_blockListUpdateIntervalHours > 0) && (_dnsWebService.DnsServer.BlockListZoneManager.BlockListUrls.Count > 0))
|
||||
if (_dnsWebService.DnsServer.BlockListZoneManager.BlockListUrls.Count > 0)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(delegate (object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
_dnsWebService.DnsServer.BlockListZoneManager.LoadBlockLists();
|
||||
StartBlockListUpdateTimer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -1565,10 +1564,11 @@ namespace DnsServerCore
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (_blockListUpdateIntervalHours > 0)
|
||||
StartBlockListUpdateTimer();
|
||||
else
|
||||
{
|
||||
StopBlockListUpdateTimer();
|
||||
}
|
||||
}
|
||||
|
||||
if (apps)
|
||||
|
||||
Reference in New Issue
Block a user