Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions nanoFramework.System.Net/NetworkHelper/NetworkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace nanoFramework.Networking
public static class NetworkHelper
{
private static ManualResetEvent _ipAddressAvailable;
private static ManualResetEvent _networkReady;
private static ManualResetEvent _networkReady = new(false);

private static bool _requiresDateTime;
private static NetworkHelperStatus _networkHelperStatus = NetworkHelperStatus.None;
Expand Down Expand Up @@ -257,9 +257,6 @@ private static void SetupHelper(bool setupEvents)

// setup handler
NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(AddressChangedCallback);

// instantiate events
_networkReady = new(false);
}

NetworkHelperInternal.InternalSetupHelper(nis, _workingNetworkInterface, _ipConfiguration);
Expand All @@ -276,7 +273,7 @@ private static void SetupHelper(bool setupEvents)
internal static void ResetInstance()
{
_ipAddressAvailable = null;
_networkReady = null;
_networkReady = new(false);
_requiresDateTime = false;
_networkHelperStatus = NetworkHelperStatus.None;
_helperException = null;
Expand Down