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

useDeprecatedSynchronousErrorHandling not calling teardown if synchronously unsubscribed #6364

Closed
benlesh opened this issue May 5, 2021 · 0 comments · Fixed by #6365
Closed
Assignees
Labels
7.x Issues and PRs for version 6.x bug Confirmed bug

Comments

@benlesh
Copy link
Member

benlesh commented May 5, 2021

Found in google3 (of course, haha) cc @leggechr

import { Observable, config } from "rxjs";

config.useDeprecatedSynchronousErrorHandling = true;

let called = false;
const observable = new Observable(obs => () => (called = true));
const subscription = observable.subscribe();
subscription.unsubscribe();

console.log("called: ", called); // logs called: false

https://stackblitz.com/edit/rxjs-4stiyw?devtoolsheight=60

@benlesh benlesh added bug Confirmed bug 7.x Issues and PRs for version 6.x labels May 5, 2021
@benlesh benlesh self-assigned this May 5, 2021
benlesh added a commit to benlesh/rxjs that referenced this issue May 5, 2021
…onousErrorHandling` is `true`.

Resolves an issue where teardowns returned by the Observable initializer were not being registered with the subscriber.

Fixes ReactiveX#6364
benlesh added a commit that referenced this issue May 5, 2021
…onousErrorHandling` is `true`. (#6365)

Resolves an issue where teardowns returned by the Observable initializer were not being registered with the subscriber.

Fixes #6364
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 bug Confirmed bug
Projects
None yet
1 participant