Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Producer being called multiple times for one input #3

Closed
AndrewSB opened this issue Sep 29, 2016 · 3 comments
Closed

Producer being called multiple times for one input #3

AndrewSB opened this issue Sep 29, 2016 · 3 comments
Labels

Comments

@AndrewSB
Copy link
Contributor

@inamiy I'm running into an interesting problem. I've noticed that on every state change, my observable is subscribed to twice, executing the code inside the observable twice.

To illustrate the problem, I forked the demo, and added some logs: https://github.com/AndrewSB/RxAutomaton/blob/swift/3.0/Demo/ViewController.swift#L42

Let me know if you need anything else to repro the issue I'm having 👍

Not sure why it's happening currently - maybe somewhere inside the source the producer is subscribed to twice?

@AndrewSB
Copy link
Contributor Author

The problem is exasperated when the observable performs an actual side effect (mine, for example, issues a connect command to the bluetooth hardware on the device it's running on, and things don't turn out well when two connect commands are sent in succession

@inamiy
Copy link
Owner

inamiy commented Oct 24, 2016

Thanks for bug report!
This happened only in RxSwift version, and fixed in #4.
Please take a look 👀

@inamiy inamiy added the bug label Oct 24, 2016
@AndrewSB
Copy link
Contributor Author

#4 looks great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants