File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
nanoFramework.System.Net/NetworkHelper Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace nanoFramework.Networking
1616 public static class NetworkHelper
1717 {
1818 private static ManualResetEvent _ipAddressAvailable ;
19- private static ManualResetEvent _networkReady ;
19+ private static ManualResetEvent _networkReady = new ( false ) ;
2020
2121 private static bool _requiresDateTime ;
2222 private static NetworkHelperStatus _networkHelperStatus = NetworkHelperStatus . None ;
@@ -257,9 +257,6 @@ private static void SetupHelper(bool setupEvents)
257257
258258 // setup handler
259259 NetworkChange . NetworkAddressChanged += new NetworkAddressChangedEventHandler ( AddressChangedCallback ) ;
260-
261- // instantiate events
262- _networkReady = new ( false ) ;
263260 }
264261
265262 NetworkHelperInternal . InternalSetupHelper ( nis , _workingNetworkInterface , _ipConfiguration ) ;
@@ -276,7 +273,7 @@ private static void SetupHelper(bool setupEvents)
276273 internal static void ResetInstance ( )
277274 {
278275 _ipAddressAvailable = null ;
279- _networkReady = null ;
276+ _networkReady = new ( false ) ;
280277 _requiresDateTime = false ;
281278 _networkHelperStatus = NetworkHelperStatus . None ;
282279 _helperException = null ;
You can’t perform that action at this time.
0 commit comments