aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-04-04 15:16:30 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-04-04 16:18:45 -0700
commit109bb09da3c96149a6d722b4d06466542965049a (patch)
tree53a027431646ceeb3a8451ef3418b5705f001b5a /src/objective-c/GRPCClient
parent5860671868f003835f77ac03a3f90336044e9329 (diff)
Surface return status from core
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index cf70064298..501114dea0 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -355,17 +355,8 @@ static NSString * const kBearerPrefix = @"Bearer ";
}
dispatch_async(_callQueue, ^{
- __weak GRPCCall *weakSelf = self;
- [self writeMessage:value withErrorHandler:^{
- __strong GRPCCall *strongSelf = weakSelf;
- if (strongSelf != nil) {
- [strongSelf maybeFinishWithError:[NSError errorWithDomain:kGRPCErrorDomain
- code:GRPCErrorCodeInternal
- userInfo:nil]];
- // Wrapped call must be canceled when error is reported to upper layers
- [strongSelf cancelCall];
- }
- }];
+ // Write error is not processed here. It is handled by op batch of GRPC_OP_RECV_STATUS_ON_CLIENT
+ [self writeMessage:value withErrorHandler:nil];
});
}
@@ -387,15 +378,8 @@ static NSString * const kBearerPrefix = @"Bearer ";
[self cancel];
} else {
dispatch_async(_callQueue, ^{
- __weak GRPCCall *weakSelf = self;
- [self finishRequestWithErrorHandler:^{
- __strong GRPCCall *strongSelf = weakSelf;
- [strongSelf maybeFinishWithError:[NSError errorWithDomain:kGRPCErrorDomain
- code:GRPCErrorCodeInternal
- userInfo:nil]];
- // Wrapped call must be canceled when error is reported to upper layers
- [strongSelf cancelCall];
- }];
+ // EOS error is not processed here. It is handled by op batch of GRPC_OP_RECV_STATUS_ON_CLIENT
+ [self finishRequestWithErrorHandler:nil];
});
}
}