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(observable): ensure the subscriber chain is complete before calling this._subscribe #1516

Closed
wants to merge 1 commit into from

Conversation

trxcllnt
Copy link
Member

Description:
If an operator subscriber completed (or unsubscribed) early after receiving values from a synchronous source, the subscribers upstream weren't disposed until after returning from the source's subscribe function. When any downstream subscriber unsubscribes, the upstream subscribers should be notified immediately and unsubscribe all the way to the source subscription.

Related issue (if exists):
@zenparsing pointed this out in #1513

cc: @Blesh

@trxcllnt trxcllnt force-pushed the sync-unsubscribe-fix branch from dc8ac13 to adee5f4 Compare March 22, 2016 21:40

subject.next('foo');
subject.complete();
subject.next('bar');
try {
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be:

expect(() => subject.next('bar')).toThrow(new Rx.ObjectUnsubscribedError())

Or something like that.

@benlesh benlesh added PR: lgtm and removed PR: lgtm labels Mar 22, 2016
@benlesh
Copy link
Member

benlesh commented Mar 22, 2016

once that one small change to the tests is in, LGTM.

@trxcllnt trxcllnt force-pushed the sync-unsubscribe-fix branch from adee5f4 to 4d3eba4 Compare March 22, 2016 22:02
@trxcllnt trxcllnt force-pushed the sync-unsubscribe-fix branch from 4d3eba4 to 756eefc Compare March 24, 2016 19:54
@benlesh
Copy link
Member

benlesh commented Mar 25, 2016

merged with 1631224, thanks @trxcllnt

@benlesh benlesh closed this Mar 25, 2016
@kwonoj
Copy link
Member

kwonoj commented Mar 25, 2016

SHA seems 1631224 .

@trxcllnt trxcllnt deleted the sync-unsubscribe-fix branch May 9, 2016 21:37
@lock
Copy link

lock bot commented Jun 7, 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 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants