Skip to content

Conversation

nlutsenko
Copy link
Contributor

No need for user.lock here, since we removed the super class one as well and we are guaranteed to be passed in a copy of opSetQueue.
Has a potential to resolve yet another deadlock specifically when using users.

[queue enumerateObjectsUsingBlock:^(PFOperationSet *operationSet, NSUInteger idx, BOOL *stop) {
// Remove operations for `password` field, to not let it persist to LDS.
if (operationSet[PFUserPasswordRESTKey]) {
operationSet = [operationSet copy];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have an operation set copy, we shouldn't need to copy it again here, nor do we need to check if the key exists first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it's an implementation detail of the superclass method, so probably safer to leave it here.

nlutsenko added a commit that referenced this pull request Oct 20, 2015
Remove potential deadlock from encoding PFUser.
@nlutsenko nlutsenko merged commit def8305 into master Oct 20, 2015
@nlutsenko nlutsenko deleted the nlutsenko.user.l branch October 20, 2015 03:36
@nlutsenko nlutsenko added this to the 1.9.1 milestone Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants