aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCChannelPool.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-20 10:06:07 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-20 10:06:07 -0700
commit4efa40d7cda4537e42adaa0dbd70097886d2c91c (patch)
tree153c20389da74ccbe38bbf2c707b511bf564b7ec /src/objective-c/GRPCClient/private/GRPCChannelPool.m
parentdcf5f1ff384da2cf0dd6b38bb9062caed58e35c0 (diff)
Validate parameters of GRPCChannelConfiguration:initWithHost:
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannelPool.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannelPool.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.m b/src/objective-c/GRPCClient/private/GRPCChannelPool.m
index 8e0f6976cf..80fa9c9151 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannelPool.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.m
@@ -35,6 +35,8 @@ extern const char *kCFStreamVarName;
@implementation GRPCChannelConfiguration
- (nullable instancetype)initWithHost:(NSString *)host callOptions:(GRPCCallOptions *)callOptions {
+ NSAssert(host.length, @"Host must not be empty.");
+ NSAssert(callOptions, @"callOptions must not be empty.");
if ((self = [super init])) {
_host = [host copy];
_callOptions = [callOptions copy];