rename kChannelPool->gChannelPool

pull/16190/head
Muxi Yan 6 years ago
parent 6032e960d4
commit 62fb609df7
  1. 10
      src/objective-c/GRPCClient/private/GRPCChannel.m

@ -64,7 +64,7 @@
}
- (void)unmanagedCallUnref {
[kChannelPool unrefChannelWithConfiguration:_configuration];
[gChannelPool unrefChannelWithConfiguration:_configuration];
}
- (nullable instancetype)initWithUnmanagedChannel:(nullable grpc_channel *)unmanagedChannel
@ -94,12 +94,12 @@
}
static dispatch_once_t initChannelPool;
static GRPCChannelPool *kChannelPool;
static GRPCChannelPool *gChannelPool;
+ (nullable instancetype)channelWithHost:(NSString *)host
callOptions:(GRPCCallOptions *)callOptions {
dispatch_once(&initChannelPool, ^{
kChannelPool = [[GRPCChannelPool alloc] init];
gChannelPool = [[GRPCChannelPool alloc] init];
});
NSURL *hostURL = [NSURL URLWithString:[@"https://" stringByAppendingString:host]];
@ -109,7 +109,7 @@ static GRPCChannelPool *kChannelPool;
GRPCChannelConfiguration *channelConfig =
[[GRPCChannelConfiguration alloc] initWithHost:host callOptions:callOptions];
return [kChannelPool channelWithConfiguration:channelConfig
return [gChannelPool channelWithConfiguration:channelConfig
createChannel:^{
return
[GRPCChannel createChannelWithConfiguration:channelConfig];
@ -117,7 +117,7 @@ static GRPCChannelPool *kChannelPool;
}
+ (void)closeOpenConnections {
[kChannelPool clear];
[gChannelPool clear];
}
@end

Loading…
Cancel
Save