Merge pull request #13180 from muxi/fix-objc-msan

Fix threading problem in gRPC ObjC
pull/15533/head
Muxi Yan 7 years ago committed by GitHub
commit a4f7d99631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/objective-c/GRPCClient/GRPCCall.m

@ -268,8 +268,10 @@ static NSString *const kBearerPrefix = @"Bearer ";
// method. // method.
// TODO(jcanizales): Rename to readResponseIfNotPaused. // TODO(jcanizales): Rename to readResponseIfNotPaused.
- (void)startNextRead { - (void)startNextRead {
if (self.state == GRXWriterStatePaused) { @synchronized(self) {
return; if (self.state == GRXWriterStatePaused) {
return;
}
} }
dispatch_async(_callQueue, ^{ dispatch_async(_callQueue, ^{

Loading…
Cancel
Save