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(share): propagate closed to firehose sources #6370

Merged
merged 5 commits into from May 6, 2021

Conversation

cartant
Copy link
Collaborator

@cartant cartant commented May 6, 2021

Description:

This PR fixes share so that it wires up the teardown before subscribing to the source - ensuring the assignment to the subscriber's closed property is propagated to the firehose source.

The skipped firehose test has been enabled and the firehose tests that related to now-deprecated operators have been removed.

Related issue (if exists): #5834 (I've closed this because it related to the now-deprecated APIs)

@cartant cartant requested a review from benlesh May 6, 2021 08:10
@cartant cartant added the 7.x Issues and PRs for version 6.x label May 6, 2021
// up _before_ the subscription to the source occurs. This is done so that
// the assignment to the source connection's `closed` property will be seen
// by synchronous firehose sources.
subscriber.add(() => {
Copy link
Member

Choose a reason for hiding this comment

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

🏆

}
});

synchronousObservable.pipe(shareReplay(), take(3)).subscribe(() => {
Copy link
Member

Choose a reason for hiding this comment

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

It seems like we'd still want this test for refCount: true.

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.

Approved. However, I think we may want to add the test back for shareReplay in the refCount: true case.

@benlesh benlesh merged commit 2271a91 into ReactiveX:master May 6, 2021
@cartant cartant deleted the cartant/share-firehose branch May 15, 2021 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x Issues and PRs for version 6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants