Skip to content

Commit

Permalink
rollback method 'AFPostReachabilityStatusChange'
Browse files Browse the repository at this point in the history
  • Loading branch information
pengwp committed Jul 25, 2018
1 parent 91cc666 commit 619a65b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AFNetworking/AFNetworkReachabilityManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetwork
* a queued notification (for an earlier status condition) is processed after
* the later update, resulting in the listener being left in the wrong state.
*/
static void AFPostReachabilityStatusChange(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusCallback block) {
static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusCallback block) {
AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags);
dispatch_async(dispatch_get_main_queue(), ^{
AFNetworkReachabilityManager *manager = nil;
Expand All @@ -92,8 +92,8 @@ static void AFPostReachabilityStatusChange(SCNetworkReachabilityRef target, SCNe
});
}

static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info) {
AFPostReachabilityStatusChange(target, flags, (__bridge AFNetworkReachabilityStatusCallback)info);
static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) {
AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusCallback)info);
}


Expand Down Expand Up @@ -230,7 +230,7 @@ - (void)startMonitoring {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{
SCNetworkReachabilityFlags flags;
if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) {
AFPostReachabilityStatusChange(self.networkReachability, flags, callback);
AFPostReachabilityStatusChange(flags, callback);
}
});
}
Expand Down

0 comments on commit 619a65b

Please sign in to comment.