aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCChannel.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-20 13:07:02 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-20 13:07:02 -0700
commit2b0470dcb3bd8306adb1c63a81c931482e86c5fa (patch)
treec921ec204ca62276c8475ddbad1657a2051978ff /src/objective-c/GRPCClient/private/GRPCChannel.m
parent9a15b6a5cfa81ab31afb4945cc1ccd8fe5be5665 (diff)
Ignore serverAuthority when using Cronet transport
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m
index 018ed28a7a..60c2e29a6e 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.m
@@ -161,7 +161,8 @@ static GRPCChannelPool *gChannelPool;
__block grpc_call *call = nil;
dispatch_sync(_dispatchQueue, ^{
if (self->_unmanagedChannel) {
- NSString *serverAuthority = callOptions.serverAuthority;
+ NSString *serverAuthority =
+ callOptions.transportType == GRPCTransportTypeCronet ? nil : callOptions.serverAuthority;
NSTimeInterval timeout = callOptions.timeout;
NSAssert(timeout >= 0, @"Invalid timeout");
grpc_slice host_slice = grpc_empty_slice();