aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCChannelPool.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-11-15 14:56:50 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-11-15 14:56:50 -0800
commitffeb0e682393e5b76d732e0b034c71f3837b9e57 (patch)
tree6670407948c46fafdc7ac711cbc9e2803af8dfa2 /src/objective-c/GRPCClient/private/GRPCChannelPool.m
parent57464321214a5ce34e5de1868ce4eb3624ebdebb (diff)
Add *if* after assert
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannelPool.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannelPool.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.m b/src/objective-c/GRPCClient/private/GRPCChannelPool.m
index 72554ca6dc..5e2e9bcfeb 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannelPool.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.m
@@ -71,6 +71,9 @@ static dispatch_once_t gInitChannelPool;
destroyDelay:(NSTimeInterval)destroyDelay {
NSAssert(host.length > 0, @"Host must not be empty.");
NSAssert(callOptions != nil, @"callOptions must not be empty.");
+ if (host.length == 0) return nil;
+ if (callOptions == nil) return nil;
+
GRPCChannel *channel;
GRPCChannelConfiguration *configuration =
[[GRPCChannelConfiguration alloc] initWithHost:host callOptions:callOptions];