Browse Source

Make Node singleton members static. Fixes UB in C# event logic

pull/8/head
Joseph Henry 5 years ago
parent
commit
49047e2391
No known key found for this signature in database
GPG Key ID: C45B33FF5EBC9344
  1. 10
      src/bindings/csharp/Node.cs

10
src/bindings/csharp/Node.cs

@ -37,15 +37,15 @@ namespace ZeroTier.Core
static int _versionRev;
static bool _isOnline = false;
static bool _hasBeenFreed = false;
string _configFilePath;
ushort _primaryPort;
static string _configFilePath;
static ushort _primaryPort;
static ZeroTierManagedEventCallback _managedCallback;
CSharpCallbackWithStruct _unmanagedCallback;
static CSharpCallbackWithStruct _unmanagedCallback;
ConcurrentDictionary<ulong, ZeroTier.Core.NetworkInfo> _networks =
static ConcurrentDictionary<ulong, ZeroTier.Core.NetworkInfo> _networks =
new ConcurrentDictionary<ulong, NetworkInfo>();
ConcurrentDictionary<ulong, ZeroTier.Core.PeerInfo> _peers = new ConcurrentDictionary<ulong, PeerInfo>();
static ConcurrentDictionary<ulong, ZeroTier.Core.PeerInfo> _peers = new ConcurrentDictionary<ulong, PeerInfo>();
public Node()
{

Loading…
Cancel
Save