From 3c8e9886aca311ee2b26e7f7ef827ac7efb42716 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 23 Oct 2018 10:53:11 -0700 Subject: [PATCH] Mark channelArg as copy --- src/objective-c/GRPCClient/private/GRPCChannel.m | 2 +- src/objective-c/GRPCClient/private/GRPCChannelPool.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 60c2e29a6ec..777cbab8092 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -265,7 +265,7 @@ static GRPCChannelPool *gChannelPool; [args addEntriesFromDictionary:config.callOptions.additionalChannelArgs]; channelArgs = args; } else { - channelArgs = [config.channelArgs copy]; + channelArgs = config.channelArgs; } id factory = config.channelFactory; grpc_channel *unmanaged_channel = [factory createChannelWithHost:host channelArgs:channelArgs]; diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.h b/src/objective-c/GRPCClient/private/GRPCChannelPool.h index 43e07b98454..2244361df2c 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannelPool.h +++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.h @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN @property(readonly) id 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;