Skip to content

Commit

Permalink
fixed tonymillion#63 - allows startNotifier to be called multiple times
Browse files Browse the repository at this point in the history
instant return if startNotifier is called and its already been called
  • Loading branch information
tonymillion committed Nov 17, 2014
1 parent 999f0e2 commit 8c3632a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Reachability.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ -(void)dealloc
-(BOOL)startNotifier
{
SCNetworkReachabilityContext context = { 0, NULL, NULL, NULL, NULL };

// allow start notifier to be called multiple times
if(self.reachabilityObject && (self.reachabilityObject == self))
{
return YES;
}

// this should do a retain on ourself, so as long as we're in notifier mode we shouldn't disappear out from under ourselves
// woah
Expand Down

0 comments on commit 8c3632a

Please sign in to comment.