diff options
author | Muxi Yan <muxi@users.noreply.github.com> | 2018-05-17 10:47:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 10:47:57 -0700 |
commit | b43c3336ac2b47dd862068a7c1b4242b68e0f2f0 (patch) | |
tree | f06cb2ab743c2175be589050f5a19abe6485f0f8 | |
parent | 3fd27cea762fef9d860dd9b0dd4b183ffb1dd245 (diff) |
Fix self use in GRXConcurrentWriteable
-rw-r--r-- | src/objective-c/RxLibrary/GRXConcurrentWriteable.m | 6 |
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; } } }); |