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(mergeAll): add source subscription to composite before actually subscribing #2479

Merged
merged 1 commit into from
Jul 26, 2018
Merged

fix(mergeAll): add source subscription to composite before actually subscribing #2479

merged 1 commit into from
Jul 26, 2018

Conversation

mpodlasin
Copy link
Contributor

Add subscriptions for source Observables to mergeAll composite subscription before actually subscribing to any of these Observables, so that if source Observable emits synchronously and consumer of mergeAll unsubscribes at that moment (for example take operator), subscription to source is unsubscribed as well and Observable stops emitting.

Closes #2476

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 97.69% when pulling 98ca133 on Podlas29:fix-merge-all-inner-subscriptions into 01e1343 on ReactiveX:master.

Copy link
Member

@benlesh benlesh left a comment

Choose a reason for hiding this comment

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

Just some clarification around a comment.

() => results.push('GOOSE!')
);

// never even get here
Copy link
Member

Choose a reason for hiding this comment

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

This comment is confusing. Why wouldn't it get here?

@mpodlasin
Copy link
Contributor Author

@benlesh done.

@coveralls
Copy link

coveralls commented Mar 29, 2017

Coverage Status

Coverage increased (+0.2%) to 96.931% when pulling f5970bf on mpodlasin:fix-merge-all-inner-subscriptions into f9318d8 on ReactiveX:master.

…ubscribing

Add subscriptions for source Observables to mergeAll composite subscription
before actually subscribing to any of these Observables, so that if
source Observable emits synchronously and consumer of mergeAll unsubscribes
at that moment (for example `take` operator), subscription to source is
unsubscribed as well and Observable stops emitting.

Closes #2476
@cartant
Copy link
Collaborator

cartant commented Jul 7, 2018

@benlesh I've rebased and refactored this PR.

@benlesh benlesh merged commit 40852ff into ReactiveX:master Jul 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants