diff options
author | 2018-12-06 22:41:03 -0800 | |
---|---|---|
committer | 2018-12-06 22:41:03 -0800 | |
commit | f0f6e03212837c67d7e078e6f33074e80aa4bcc0 (patch) | |
tree | 28cf8e66afe60a741dda4fe07db29ff65dac6919 /src/objective-c/GRPCClient/private/GRPCWrappedCall.m | |
parent | 1a9404876ce0315fc05fe82465dc389600db0965 (diff) |
clang-format
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCWrappedCall.m')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 35 |
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; |