summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2016-11-18 13:59:31 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2016-11-18 13:59:31 -0800
commit299a7cab200c0af4743ab36d41994fd7a582f900 (patch)
treeba0197a9761eb459a3217bf46a491bcc67debecf
parente48d6880c92b87efb694798b43873dc07a570035 (diff)
downloadinfinitytier-299a7cab200c0af4743ab36d41994fd7a582f900.tar.gz
infinitytier-299a7cab200c0af4743ab36d41994fd7a582f900.zip
fixed an issue where sometimes network data wouldnt be updated
-rw-r--r--windows/WinUI/NetworkMonitor.cs1
-rw-r--r--windows/WinUI/ZeroTierNetwork.cs7
2 files changed, 7 insertions, 1 deletions
diff --git a/windows/WinUI/NetworkMonitor.cs b/windows/WinUI/NetworkMonitor.cs
index 7743c5b9..7adfe0bf 100644
--- a/windows/WinUI/NetworkMonitor.cs
+++ b/windows/WinUI/NetworkMonitor.cs
@@ -118,6 +118,7 @@ namespace WinUI
}
}
+ _knownNetworks.Sort();
_nwCb(_knownNetworks);
}
diff --git a/windows/WinUI/ZeroTierNetwork.cs b/windows/WinUI/ZeroTierNetwork.cs
index ecae0256..d6802385 100644
--- a/windows/WinUI/ZeroTierNetwork.cs
+++ b/windows/WinUI/ZeroTierNetwork.cs
@@ -478,7 +478,12 @@ namespace WinUI
{
public bool Equals(ZeroTierNetwork lhs, ZeroTierNetwork rhs)
{
- return lhs.NetworkId.Equals(rhs.NetworkId);
+ if (lhs.NetworkId.Equals(rhs.NetworkId))
+ {
+ lhs.UpdateNetwork(rhs);
+ return true;
+ }
+ return false;
}
public int GetHashCode(ZeroTierNetwork obj)