Mark channelArg as copy

pull/16190/head
Muxi Yan 6 years ago
parent 8986cfe625
commit 3c8e9886ac
  1. 2
      src/objective-c/GRPCClient/private/GRPCChannel.m
  2. 2
      src/objective-c/GRPCClient/private/GRPCChannelPool.h

@ -265,7 +265,7 @@ static GRPCChannelPool *gChannelPool;
[args addEntriesFromDictionary:config.callOptions.additionalChannelArgs];
channelArgs = args;
} else {
channelArgs = [config.channelArgs copy];
channelArgs = config.channelArgs;
}
id<GRPCChannelFactory> factory = config.channelFactory;
grpc_channel *unmanaged_channel = [factory createChannelWithHost:host channelArgs:channelArgs];

@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(readonly) id<GRPCChannelFactory> channelFactory;
/** Acquire the dictionary of channel args with current configurations. */
@property(readonly) NSDictionary *channelArgs;
@property(copy, readonly) NSDictionary *channelArgs;
- (nullable instancetype)initWithHost:(NSString *)host callOptions:(GRPCCallOptions *)callOptions;

Loading…
Cancel
Save