Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pluto): Handle write operations inside FlatMap with Future #186

Closed

Conversation

coveloper
Copy link

Description:

Identus example app consistently throws a recursive save error when calling .sendMessage() as described in #183

Wrapping these .flatMap write operations in a Future seems to fix it in my example.
*note: If this is an acceptable fix, we might need to add another similar Future inside addMessages()'s .flatMap

Alternatives Considered (optional):

I had tried adding guard self.hasChanges else { return } on line 12 of NSManagedObjectContext+Save.swift but that didn't seem to have any effect on this issue.

Checklist:

  • My PR follows the contribution guidelines of this project
  • My PR is free of third-party dependencies that don't comply with the Allowlist
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked the PR title to follow the conventional commit specification

@coveloper coveloper requested a review from a team as a code owner January 21, 2025 07:44
@coveloper coveloper closed this Jan 21, 2025
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.

1 participant