aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCChannel.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-12-06 18:26:51 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-12-06 18:26:51 -0800
commitda759f1fc63ceb0c893bb6027bacfadfda5ab111 (patch)
treee529cda89aaf09bbc91b95505bc0d5fdc615851a /src/objective-c/GRPCClient/private/GRPCChannel.m
parentf9e50322bf1d6be736b415831eea44130b9dedfe (diff)
batch fixes
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCChannel.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m
index 9432e7ab39..edcedf6e24 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.m
@@ -28,7 +28,6 @@
#import "GRPCCronetChannelFactory.h"
#import "GRPCInsecureChannelFactory.h"
#import "GRPCSecureChannelFactory.h"
-#import "utilities.h"
#import "version.h"
#import <GRPCClient/GRPCCall+Cronet.h>
@@ -63,8 +62,9 @@
factory = [GRPCSecureChannelFactory
factoryWithPEMRootCertificates:_callOptions.PEMRootCertificates
privateKey:_callOptions.PEMPrivateKey
- certChain:_callOptions.PEMCertChain
+ certChain:_callOptions.PEMCertificateChain
error:&error];
+ NSAssert(factory != nil, @"Failed to create secure channel factory");
if (factory == nil) {
NSLog(@"Error creating secure channel factory: %@", error);
}
@@ -114,8 +114,8 @@
[NSNumber numberWithUnsignedInteger:(NSUInteger)(_callOptions.keepaliveTimeout * 1000)];
}
- if (_callOptions.retryEnabled == NO) {
- args[@GRPC_ARG_ENABLE_RETRIES] = [NSNumber numberWithInt:_callOptions.retryEnabled];
+ if (!_callOptions.retryEnabled) {
+ args[@GRPC_ARG_ENABLE_RETRIES] = [NSNumber numberWithInt:_callOptions.retryEnabled ? 1 : 0];
}
if (_callOptions.connectMinTimeout > 0) {