Make Node singleton members static. Fixes UB in C# event logic
This commit is contained in:
@@ -37,15 +37,15 @@ namespace ZeroTier.Core
|
|||||||
static int _versionRev;
|
static int _versionRev;
|
||||||
static bool _isOnline = false;
|
static bool _isOnline = false;
|
||||||
static bool _hasBeenFreed = false;
|
static bool _hasBeenFreed = false;
|
||||||
string _configFilePath;
|
static string _configFilePath;
|
||||||
ushort _primaryPort;
|
static ushort _primaryPort;
|
||||||
|
|
||||||
static ZeroTierManagedEventCallback _managedCallback;
|
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>();
|
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()
|
public Node()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user