diff --git a/DnsServerCore/Dns/Zones/Zone.cs b/DnsServerCore/Dns/Zones/Zone.cs index ab20301c..f16f4e4a 100644 --- a/DnsServerCore/Dns/Zones/Zone.cs +++ b/DnsServerCore/Dns/Zones/Zone.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2020 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2021 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ namespace DnsServerCore.Dns.Zones #region variables protected readonly string _name; - protected readonly ConcurrentDictionary> _entries = new ConcurrentDictionary>(); + protected readonly ConcurrentDictionary> _entries; #endregion @@ -41,6 +41,13 @@ namespace DnsServerCore.Dns.Zones protected Zone(string name) { _name = name; + _entries = new ConcurrentDictionary>(1, 5); + } + + protected Zone(string name, int capacity) + { + _name = name; + _entries = new ConcurrentDictionary>(1, capacity); } #endregion