Remove hostname extraction for ConnectivityMonitor

pull/14585/head
Muxi Yan 7 years ago committed by GitHub
parent f22dae6b91
commit a1cb4592a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/objective-c/GRPCClient/GRPCCall.m

@ -469,12 +469,6 @@ static NSString * const kBearerPrefix = @"Bearer ";
[self sendHeaders:_requestHeaders];
[self invokeCall];
// TODO(jcanizales): Extract this logic somewhere common.
NSString *host = [NSURL URLWithString:[@"https://" stringByAppendingString:_host]].host;
if (!host) {
// TODO(jcanizales): Check this on init.
[NSException raise:NSInvalidArgumentException format:@"host of %@ is nil", _host];
}
[GRPCConnectivityMonitor registerObserver:self
selector:@selector(connectivityChanged:)];
}

Loading…
Cancel
Save