mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-23 00:07:28 +00:00
DnsWebService: fixed issue in StartAsync() that cause not loading block lists when update interval is set to 0.
This commit is contained in:
@@ -2230,14 +2230,13 @@ namespace DnsServerCore
|
||||
_dnsServer.BlockedZoneManager.LoadBlockedZoneFile();
|
||||
|
||||
//load block list zone async
|
||||
if ((_settingsApi.BlockListUpdateIntervalHours > 0) && (_dnsServer.BlockListZoneManager.BlockListUrls.Count > 0))
|
||||
if (_dnsServer.BlockListZoneManager.BlockListUrls.Count > 0)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(delegate (object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
_dnsServer.BlockListZoneManager.LoadBlockLists();
|
||||
_settingsApi.StartBlockListUpdateTimer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -2246,6 +2245,9 @@ namespace DnsServerCore
|
||||
});
|
||||
}
|
||||
|
||||
if (_settingsApi.BlockListUpdateIntervalHours > 0)
|
||||
_settingsApi.StartBlockListUpdateTimer();
|
||||
|
||||
//load dns cache async
|
||||
if (_saveCache)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user