fix(connectivity): making startMonitoring() behave on iOS as on Android (#6373)

On Android, when calling startMonitor it will immediately fire the callback with the current state. Now it does the same on iOS.
This commit is contained in:
Nicu
2018-10-23 00:06:39 +03:00
committed by Alexander Vakrilov
parent a211bbdbdc
commit a58fc528b2

View File

@@ -75,6 +75,7 @@ export function startMonitoring(connectionTypeChangedCallback: (newConnectionTyp
_connectionTypeChangedCallback = <any>zonedCallback(connectionTypeChangedCallback);
SCNetworkReachabilitySetCallback(_monitorReachabilityRef, _reachabilityCallbackFunctionRef, null);
SCNetworkReachabilityScheduleWithRunLoop(_monitorReachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
_connectionTypeChangedCallback(_getConnectionType());
}
}