aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-12-06 22:41:03 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-12-06 22:41:03 -0800
commitf0f6e03212837c67d7e078e6f33074e80aa4bcc0 (patch)
tree28cf8e66afe60a741dda4fe07db29ff65dac6919 /src/objective-c/GRPCClient/private/GRPCWrappedCall.m
parent1a9404876ce0315fc05fe82465dc389600db0965 (diff)
clang-format
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCWrappedCall.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 82149e3dba..9066cb950f 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -267,7 +267,7 @@
[GRPCOpBatchLog addOpBatchToLog:operations];
#endif
- @synchronized (self) {
+ @synchronized(self) {
if (_call != NULL) {
size_t nops = operations.count;
grpc_op *ops_array = gpr_malloc(nops * sizeof(grpc_op));
@@ -275,19 +275,20 @@
for (GRPCOperation *operation in operations) {
ops_array[i++] = operation.op;
}
- grpc_call_error error = grpc_call_start_batch(_call, ops_array, nops, (__bridge_retained void *)(^(bool success) {
- if (!success) {
- if (errorHandler) {
- errorHandler();
- } else {
- return;
- }
- }
- for (GRPCOperation *operation in operations) {
- [operation finish];
- }
- }),
- NULL);
+ grpc_call_error error =
+ grpc_call_start_batch(_call, ops_array, nops, (__bridge_retained void *)(^(bool success) {
+ if (!success) {
+ if (errorHandler) {
+ errorHandler();
+ } else {
+ return;
+ }
+ }
+ for (GRPCOperation *operation in operations) {
+ [operation finish];
+ }
+ }),
+ NULL);
gpr_free(ops_array);
NSAssert(error == GRPC_CALL_OK, @"Error starting a batch of operations: %i", error);
@@ -296,7 +297,7 @@
}
- (void)cancel {
- @synchronized (self) {
+ @synchronized(self) {
if (_call != NULL) {
grpc_call_cancel(_call, NULL);
}
@@ -304,7 +305,7 @@
}
- (void)channelDisconnected {
- @synchronized (self) {
+ @synchronized(self) {
if (_call != NULL) {
grpc_call_unref(_call);
_call = NULL;
@@ -313,7 +314,7 @@
}
- (void)dealloc {
- @synchronized (self) {
+ @synchronized(self) {
if (_call != NULL) {
grpc_call_unref(_call);
_call = NULL;