Describe the bug
When using tap passing in a Subject directly (i.e. without using { next, error, complete }), if the resulting observer creates a subscription and unsubscribes from it, then the Subject is also unsubscribed: If a new subscriber comes, it will throw an ObjectUnsubscribedError.
I've bisected this happened somewhere in between 7.2.0 and 7.3.0
Expected behavior
When the resulting subscription is closed, the Subject should not be killed: The new subscription should work just as fine as the initial one.
Reproduction code
const subject = new Subject();
interval(1000).pipe(
tap(subject),
take(2),
repeat(2)
).subscribe(v => console.log(v))
Reproduction URL
https://stackblitz.com/edit/rxjs-a9l4j2?file=index.ts
Version
7.3.0
Environment
No response
Additional context
No response
Describe the bug
When using
tappassing in a Subject directly (i.e. without using{ next, error, complete }), if the resulting observer creates a subscription and unsubscribes from it, then the Subject is also unsubscribed: If a new subscriber comes, it will throw anObjectUnsubscribedError.I've bisected this happened somewhere in between 7.2.0 and 7.3.0
Expected behavior
When the resulting subscription is closed, the Subject should not be killed: The new subscription should work just as fine as the initial one.
Reproduction code
Reproduction URL
https://stackblitz.com/edit/rxjs-a9l4j2?file=index.ts
Version
7.3.0
Environment
No response
Additional context
No response