I'm still a noob when it comes to RxJS but here's a JSBin of what I am trying to do.
https://jsbin.com/wusalibiyu/1/edit?js,console
I have an observable 'a' (in my case it's the current active connection) which emits a new object whenever the connection reconnects. It's an observable itself because it can re-emit a new value.
I now want an observable that completes whenever an action is executed on the current connection. That action notifies it is done when the observable for it completes. This is b.
The problem is that when the inner observable completes, the outer does not complete. How to make the outer observable complete ... . Is there a different operator I should be using in RxJS5?