diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index d6c3a3c165a..f1f7b5d08d2 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -244,9 +244,12 @@ static NSString * const kBearerPrefix = @"Bearer "; // method. // TODO(jcanizales): Rename to readResponseIfNotPaused. - (void)startNextRead { - if (self.state == GRXWriterStatePaused) { - return; + @synchronized(self) { + if (self.state == GRXWriterStatePaused) { + return; + } } + __weak GRPCCall *weakSelf = self; __weak GRXConcurrentWriteable *weakWriteable = _responseWriteable;