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 shared state in retry #829

Merged

Conversation

sebastiangrail
Copy link
Contributor

This fixes an issue where state is shared between different start invocations of the same producer.

let p = someProducer.retry(upTo: 1, interval: interval, on:scheduler)

p.start(...) // This consumes retries for the purpose of delaying errors
...
p.start(...) // Retries for the purpose of delaying errors can be negative here, resulting in the last error not being sent immediately.

Checklist

  • Updated CHANGELOG.md.

@sebastiangrail
Copy link
Contributor Author

@andersio Could you review this PR, please?

@NachoSoto
Copy link
Member

Could you write a test for this?

@andersio andersio merged commit 7cbe50f into ReactiveCocoa:master Nov 19, 2021
Copy link

@Deloww Deloww left a comment

Choose a reason for hiding this comment

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

@ReactiveCocoa ReactiveCocoa deleted a comment from Deloww May 16, 2022
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.

None yet

4 participants