diff --git a/LinuxCommunicator/HostsFile/HostsFileManager.cs b/LinuxCommunicator/HostsFile/HostsFileManager.cs index 87b6ec0..4f28297 100644 --- a/LinuxCommunicator/HostsFile/HostsFileManager.cs +++ b/LinuxCommunicator/HostsFile/HostsFileManager.cs @@ -144,6 +144,7 @@ public void ReloadTimerEvent(object param) if (ipEntryMatch.Success && manageByHPC && + !ipEntryMatch.Groups["ip"].Value.StartsWith(@"169.254") && ipEntryMatch.Groups["comment"].Value.Equals(HostsFileManager.ManagedEntryKey, StringComparison.OrdinalIgnoreCase) && HostEntry.TryCreate(ipEntryMatch.Groups["dnsName"].Value, ipEntryMatch.Groups["ip"].Value, out entry)) { @@ -203,10 +204,7 @@ protected virtual void Dispose(bool isDisposing) { if (isDisposing) { - if (this.reloadTimer != null) - { - this.reloadTimer.Dispose(); - } + this.reloadTimer?.Dispose(); } } }