|
|
@ -108,7 +108,10 @@ static NSMutableDictionary *kHostCache; |
|
|
|
serverName:(NSString *)serverName |
|
|
|
serverName:(NSString *)serverName |
|
|
|
timeout:(NSTimeInterval)timeout |
|
|
|
timeout:(NSTimeInterval)timeout |
|
|
|
completionQueue:(GRPCCompletionQueue *)queue { |
|
|
|
completionQueue:(GRPCCompletionQueue *)queue { |
|
|
|
GRPCChannel *channel; |
|
|
|
// The __block attribute is to allow channel take refcount inside @synchronized block. Without |
|
|
|
|
|
|
|
// this attribute, retain of channel object happens after objc_sync_exit in release builds, which |
|
|
|
|
|
|
|
// may result in channel released before used. See grpc/#15033. |
|
|
|
|
|
|
|
__block GRPCChannel *channel; |
|
|
|
// This is racing -[GRPCHost disconnect]. |
|
|
|
// This is racing -[GRPCHost disconnect]. |
|
|
|
@synchronized(self) { |
|
|
|
@synchronized(self) { |
|
|
|
if (!_channel) { |
|
|
|
if (!_channel) { |
|
|
|