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(subscriptions): unsubscribe correctly when a Subscriber throws during synchronous dispatch. #1191

Closed

Conversation

trxcllnt
Copy link
Member

Resolves #1186. Also adds more tests ensuring calls to next, error, and complete are called in the context of whatever Observer they were specified from (the SafeSubscriber in the case of callbacks, or the Object instance if given a duck-typed Observer).

}

public syncErrorValue: any = null;
public syncErrorThrown: boolean = false;
public syncErrorThrowable: boolean = true;
Copy link
Member

Choose a reason for hiding this comment

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

Do these need to be public or can they be protected?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Blesh they do, since they need to be accessible to Observable's subscribe.

@trxcllnt trxcllnt force-pushed the unsubscribe-on-sync-throws branch 2 times, most recently from b5e781a to 6130382 Compare January 15, 2016 04:11
@trxcllnt trxcllnt force-pushed the unsubscribe-on-sync-throws branch 2 times, most recently from f96b0f2 to 10ab9ed Compare January 30, 2016 01:57
@trxcllnt trxcllnt force-pushed the unsubscribe-on-sync-throws branch from 10ab9ed to c4acd2d Compare January 30, 2016 02:07
@trxcllnt
Copy link
Member Author

@Blesh updated this PR

@benlesh
Copy link
Member

benlesh commented Feb 2, 2016

Merged as of b1698fe... After some perf testing, there was no perceivable difference in performance.

Thanks for the solid work, @trxcllnt

@benlesh benlesh closed this Feb 2, 2016
@trxcllnt trxcllnt deleted the unsubscribe-on-sync-throws branch February 9, 2016 06:30
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants