diff options
author | Muxi Yan <mxyan@google.com> | 2018-10-20 10:06:07 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-10-20 10:06:07 -0700 |
commit | 4efa40d7cda4537e42adaa0dbd70097886d2c91c (patch) | |
tree | 153c20389da74ccbe38bbf2c707b511bf564b7ec /src/objective-c/GRPCClient | |
parent | dcf5f1ff384da2cf0dd6b38bb9062caed58e35c0 (diff) |
Validate parameters of GRPCChannelConfiguration:initWithHost:
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCChannelPool.m | 2 |
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]; |