aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/RxLibrary
diff options
context:
space:
mode:
authorGravatar Muxi Yan <muxi@users.noreply.github.com>2018-05-25 13:56:44 -0700
committerGravatar GitHub <noreply@github.com>2018-05-25 13:56:44 -0700
commit4d6644ada8707f72a695daf9cc49af6b7e2f17b0 (patch)
tree35d26e08c06e7b524b18f586f23595e9e5893632 /src/objective-c/RxLibrary
parent35201969e806cc15a287338e21e44e9ec8072751 (diff)
parentb43c3336ac2b47dd862068a7c1b4242b68e0f2f0 (diff)
Merge pull request #15429 from grpc/fix-conc-self
Fix self use in GRXConcurrentWriteable
Diffstat (limited to 'src/objective-c/RxLibrary')
-rw-r--r--src/objective-c/RxLibrary/GRXConcurrentWriteable.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/objective-c/RxLibrary/GRXConcurrentWriteable.m b/src/objective-c/RxLibrary/GRXConcurrentWriteable.m
index 523c59c6de..81ccc3fbce 100644
--- a/src/objective-c/RxLibrary/GRXConcurrentWriteable.m
+++ b/src/objective-c/RxLibrary/GRXConcurrentWriteable.m
@@ -68,7 +68,7 @@
typeof(self) strongSelf = weakSelf;
if (strongSelf) {
BOOL finished = NO;
- @synchronized(self) {
+ @synchronized(strongSelf) {
if (!strongSelf->_alreadyFinished) {
strongSelf->_alreadyFinished = YES;
} else {
@@ -78,9 +78,9 @@
if (!finished) {
// Cancellation is now impossible. None of the other three blocks can run concurrently with
// this one.
- [self.writeable writesFinishedWithError:nil];
+ [strongSelf.writeable writesFinishedWithError:nil];
// Skip any possible message to the wrapped writeable enqueued after this one.
- self.writeable = nil;
+ strongSelf.writeable = nil;
}
}
});