Skip to content

Commit

Permalink
No need for deltas to be a firewall task
Browse files Browse the repository at this point in the history
  • Loading branch information
jjxtra committed Jun 14, 2022
1 parent 58b4099 commit a3b02f9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions IPBanCore/Core/IPBan/IPBanService_Private.cs
Original file line number Diff line number Diff line change
Expand Up @@ -975,14 +975,7 @@ private async Task UpdateFirewall()
List<IPBanFirewallIPAddressDelta> deltas = ipDB.EnumerateIPAddressesDeltaAndUpdateState(true, UtcNow, Config.ResetFailedLoginCountForUnbannedIPAddresses).Where(i => !i.Added || !IsWhitelisted(i.IPAddress)).ToList();
Logger.Warn("Updating firewall with {0} entries...", deltas.Count);
Logger.Info("Firewall entries updated: {0}", string.Join(',', deltas.Select(d => d.IPAddress)));
if (MultiThreaded)
{
RunFirewallTask((token) => Firewall.BlockIPAddressesDelta(null, deltas, null, token));
}
else
{
await Firewall.BlockIPAddressesDelta(null, deltas);
}
await Firewall.BlockIPAddressesDelta(null, deltas);
}
}

Expand Down

0 comments on commit a3b02f9

Please sign in to comment.