-
Notifications
You must be signed in to change notification settings - Fork 432
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
Starting a SignalProducer with debounce twice doesn't deliver values to the second observer #771
Comments
I reverted (most of) #605 and the tests both fail. Not the solution but it shows that this is what broke the behavior and (and least imho) shows it's broken now. |
Argh, state is shared across produced signals. That's why it is broken when it is started more than once. 🙈 |
Moving https://github.com/ReactiveCocoa/ReactiveSwift/blob/master/Sources/Event.swift#L873 into the outer closure (not the inner one, which is the event sink) should resolve the issue. |
You got it! I'll submit a PR Monday with the fix and added tests. Thanks for the quick help. |
Should be fixed as part of #772 |
This is related to #718.
I just found something similar on my project and I believe
debounce
to be broken when you start a producer twice. With latest master, I added the following tests toSignalProducerSpec.swift
and they both fail (just the second expectation of eachit
, not the first):If you remove the
debounce
from the chain they succeed.I understand why changing it to a
Signal
would fix this but shouldn't this work for this case as well?I noticed this on one of my projects after I updated
ReactiveSwift
from 3.1 to 6.2. On 3.1 this was working as I'd expect but on 6.1 my feature broke because of this.I'm afraid it might be because of #605 as this is the only change regarding
debounce
on the changelog but I have not confirmed that yet.I'm investigating further and if I find something I'll submit a PR but want to have the issue to track and have some more expert eyes on it.
The text was updated successfully, but these errors were encountered: