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(find): force unsubscribe when it completes or errors #2550

Merged
merged 1 commit into from
May 16, 2017
Merged

fix(find): force unsubscribe when it completes or errors #2550

merged 1 commit into from
May 16, 2017

Conversation

mpodlasin
Copy link
Contributor

Description:

Force unsubscribe when resulting Observable completes or errors, even when following operator does not unsubscribe reliably, so that source Observable is not being subscribed unnecessarily.

Related issue (if exists):
General description of this type of issue - #2459
The same fix for other operators - #2501 #2463 #2470

Force unsubscribe when resulting Observable completes or errors,
even when following operator does not unsubscribe reliably,
so that source Observable is not being subscribed unnecessarily.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0007%) to 97.688% when pulling c975b2b on Podlas29:find-with-switch-map-fix into dc2e7f1 on ReactiveX:master.

@@ -85,6 +85,7 @@ export class FindValueSubscriber<T> extends Subscriber<T> {

destination.next(value);
destination.complete();
Copy link
Member

Choose a reason for hiding this comment

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

This seems odd... calling complete on the destination, should end up calling unsubscribe on the destination, and subsequently up the chain to here. Although maybe I've got my head in a knot thinking about it. cc @trxcllnt

@benlesh
Copy link
Member

benlesh commented May 16, 2017

Thank you @Podlas29!!

GulajavaMinistudio added a commit to GulajavaMinistudio/rxjs that referenced this pull request May 17, 2017
fix(find): force unsubscribe when it completes or errors (ReactiveX#2550)
benlesh added a commit that referenced this pull request Jun 14, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 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.

3 participants