aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCHost.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <muxi@users.noreply.github.com>2018-05-16 17:02:08 -0700
committerGravatar GitHub <noreply@github.com>2018-05-16 17:02:08 -0700
commit3001499c0f68efd1dc0d3ed02bbb1845a1eb7fba (patch)
tree89ad8d74c24743ff1af7ea46a97695097073224d /src/objective-c/GRPCClient/private/GRPCHost.m
parentbc946acd7e089f85228de977849e1d9d5eb5a718 (diff)
parent0f1fcd48f21e7d52edeac3e2087f32521cc9f11f (diff)
Merge pull request #15050 from grpc/fix-grpchost-connchange
Fix GRPCHost callback for connectivity monitor
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCHost.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCHost.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m
index bfb1fd352c..c3ea9afc37 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.m
+++ b/src/objective-c/GRPCClient/private/GRPCHost.m
@@ -50,6 +50,7 @@ static NSMutableDictionary *kHostCache;
if (_channelCreds != nil) {
grpc_channel_credentials_release(_channelCreds);
}
+ [GRPCConnectivityMonitor unregisterObserver:self];
}
// Default initializer.
@@ -278,7 +279,7 @@ static NSMutableDictionary *kHostCache;
// and Cellular data, so that a new call will use a new channel. Otherwise, a new call will still
// use the cached channel which is no longer available and will cause gRPC to hang.
- (void)connectivityChange:(NSNotification *)note {
- [GRPCHost flushChannelCache];
+ [self disconnect];
}
@end