diff options
author | 2018-11-18 23:00:08 -0800 | |
---|---|---|
committer | 2018-11-18 23:00:08 -0800 | |
commit | 680b53f7ad7c93947003dcf8d377f2b33c7623e9 (patch) | |
tree | f65b4e4658680e4cd4d74e60dfb9f50616865c60 /src/objective-c/GRPCClient/private/GRPCChannel.m | |
parent | f0cbcde73195b8e17130538c3479d4c0e3bcd2a2 (diff) |
clang-format
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannel.m')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCChannel.m | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 81e53d48e3..e4cefc338c 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -178,10 +178,8 @@ grpc_channel *_unmanagedChannel; } -- (instancetype)initWithChannelConfiguration: - (GRPCChannelConfiguration *)channelConfiguration { - NSAssert(channelConfiguration != nil, - @"channelConfiguration must not be empty."); +- (instancetype)initWithChannelConfiguration:(GRPCChannelConfiguration *)channelConfiguration { + NSAssert(channelConfiguration != nil, @"channelConfiguration must not be empty."); if (channelConfiguration == nil) return nil; if ((self = [super init])) { @@ -221,12 +219,11 @@ grpc_call *call = NULL; @synchronized(self) { - NSAssert(_unmanagedChannel != NULL, - @"Channel should have valid unmanaged channel."); + NSAssert(_unmanagedChannel != NULL, @"Channel should have valid unmanaged channel."); if (_unmanagedChannel == NULL) return NULL; NSString *serverAuthority = - callOptions.transportType == GRPCTransportTypeCronet ? nil : callOptions.serverAuthority; + callOptions.transportType == GRPCTransportTypeCronet ? nil : callOptions.serverAuthority; NSTimeInterval timeout = callOptions.timeout; NSAssert(timeout >= 0, @"Invalid timeout"); if (timeout < 0) return NULL; @@ -236,10 +233,9 @@ } grpc_slice path_slice = grpc_slice_from_copied_string(path.UTF8String); gpr_timespec deadline_ms = - timeout == 0 - ? gpr_inf_future(GPR_CLOCK_REALTIME) - : gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_millis((int64_t)(timeout * 1000), GPR_TIMESPAN)); + timeout == 0 ? gpr_inf_future(GPR_CLOCK_REALTIME) + : gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_millis((int64_t)(timeout * 1000), GPR_TIMESPAN)); call = grpc_channel_create_call(_unmanagedChannel, NULL, GRPC_PROPAGATE_DEFAULTS, queue.unmanagedQueue, path_slice, serverAuthority ? &host_slice : NULL, deadline_ms, NULL); |