You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2016/12/28 23:27:49 UTC

cordova-plugin-network-information git commit: CB-11838 ios: Unregister callback function at the right timing.

Repository: cordova-plugin-network-information
Updated Branches:
  refs/heads/master ee0cb16e5 -> f4f1abec3


CB-11838 ios: Unregister callback function at the right timing.

We at LINE observed about 40K crashes a day that were suspected to be
caused by the reacahability callback function invoked on an
already-deallocated object. We couldn't reproduced the crash locally
but this patch did reduce the number of crash reports to zero.

 This closes #49


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/commit/f4f1abec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/tree/f4f1abec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/diff/f4f1abec

Branch: refs/heads/master
Commit: f4f1abec3a0f5e5efd1ec8bc8312c97ad92deefa
Parents: ee0cb16
Author: Ken'ichi Fukushima <ke...@gmail.com>
Authored: Mon Sep 12 18:28:49 2016 +0900
Committer: Julio C�sar <jc...@gmail.com>
Committed: Thu Dec 29 00:26:44 2016 +0100

----------------------------------------------------------------------
 src/ios/CDVReachability.m | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information/blob/f4f1abec/src/ios/CDVReachability.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVReachability.m b/src/ios/CDVReachability.m
index 70177a7..b43a62d 100644
--- a/src/ios/CDVReachability.m
+++ b/src/ios/CDVReachability.m
@@ -120,6 +120,7 @@ static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkRe
 - (void)stopNotifier
 {
     if (reachabilityRef != NULL) {
+        SCNetworkReachabilitySetCallback(reachabilityRef, NULL, NULL);
         SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org