cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcesarmob...@apache.org
Subject cordova-plugin-network-information git commit: CB-11838 ios: Unregister callback function at the right timing.
Date Wed, 28 Dec 2016 23:27:49 GMT
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 <ken.fukushima@gmail.com>
Authored: Mon Sep 12 18:28:49 2016 +0900
Committer: Julio César <jcesarmobile@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


Mime
View raw message