This commit is contained in:
Phyxion
2020-01-31 15:29:32 +01:00
parent d1cff07571
commit 367fa2d913
2 changed files with 62 additions and 42 deletions
@@ -21,6 +21,7 @@ namespace LibreHardwareMonitor.Hardware.Network
{
_settings = settings;
AddNetworkInterfaces(settings);
NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;
NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAddressChanged;
}
@@ -54,6 +55,7 @@ namespace LibreHardwareMonitor.Hardware.Network
{
NetworkChange.NetworkAddressChanged -= NetworkChange_NetworkAddressChanged;
NetworkChange.NetworkAvailabilityChanged -= NetworkChange_NetworkAddressChanged;
foreach (var nic in _hardware)
nic.Close();
}