Comment on the fix

pull/15086/head
Muxi Yan 7 years ago
parent bb5482f944
commit bc1a1b4411
  1. 3
      src/objective-c/GRPCClient/private/GRPCHost.m

@ -108,6 +108,9 @@ static NSMutableDictionary *kHostCache;
serverName:(NSString *)serverName
timeout:(NSTimeInterval)timeout
completionQueue:(GRPCCompletionQueue *)queue {
// 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].
@synchronized(self) {

Loading…
Cancel
Save