aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCWrappedCall.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/GRPCWrappedCall.m
parentf9e50322bf1d6be736b415831eea44130b9dedfe (diff)
batch fixes
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCWrappedCall.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 727c9e0a88..82149e3dba 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -30,7 +30,6 @@
#import "NSData+GRPC.h"
#import "NSDictionary+GRPC.h"
#import "NSError+GRPC.h"
-#import "utilities.h"
#import "GRPCOpBatchLog.h"
@@ -237,6 +236,7 @@
#pragma mark GRPCWrappedCall
@implementation GRPCWrappedCall {
+ // pooledChannel holds weak reference to this object so this is ok
GRPCPooledChannel *_pooledChannel;
grpc_call *_call;
}
@@ -275,8 +275,7 @@
for (GRPCOperation *operation in operations) {
ops_array[i++] = operation.op;
}
- grpc_call_error error;
- error = grpc_call_start_batch(_call, ops_array, nops, (__bridge_retained void *)(^(bool success) {
+ grpc_call_error error = grpc_call_start_batch(_call, ops_array, nops, (__bridge_retained void *)(^(bool success) {
if (!success) {
if (errorHandler) {
errorHandler();
@@ -291,11 +290,7 @@
NULL);
gpr_free(ops_array);
- if (error != GRPC_CALL_OK) {
- [NSException
- raise:NSInternalInconsistencyException
- format:@"A precondition for calling grpc_call_start_batch wasn't met. Error %i", error];
- }
+ NSAssert(error == GRPC_CALL_OK, @"Error starting a batch of operations: %i", error);
}
}
}