Skip to content

Commit

Permalink
Add missing scheduleObserver call in initWithAddress: refs #408
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatters committed Oct 20, 2011
1 parent a863da1 commit a3d15d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Code/Network/RKReachabilityObserver.h
Expand Up @@ -54,7 +54,7 @@ typedef enum {
SCNetworkReachabilityRef _reachabilityRef;
BOOL _reachabilityDetermined;
BOOL _monitoringLocalWiFi;
SCNetworkReachabilityFlags _reachabilityFlags;
SCNetworkReachabilityFlags _reachabilityFlags;
}

/**
Expand Down
5 changes: 4 additions & 1 deletion Code/Network/RKReachabilityObserver.m
Expand Up @@ -122,6 +122,9 @@ - (id)initWithAddress:(const struct sockaddr *)address {
// Obtain the flags after giving other objects a chance to observe us
[self getFlags];
});

// Schedule the observer
[self scheduleObserver];
}
}
return self;
Expand Down Expand Up @@ -343,7 +346,7 @@ - (void)scheduleObserver {
}
}

- (void)unscheduleObserver {
- (void)unscheduleObserver {
if (_reachabilityRef) {
RKLogDebug(@"%@: Unscheduling reachability observer from main dispatch queue", self);
if (! SCNetworkReachabilitySetDispatchQueue(_reachabilityRef, NULL)) {
Expand Down

0 comments on commit a3d15d8

Please sign in to comment.