-
Notifications
You must be signed in to change notification settings - Fork 3k
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(window): don't track internal window subjects as subscriptions. #1708
fix(window): don't track internal window subjects as subscriptions. #1708
Conversation
64991dd
to
98e7d13
Compare
98e7d13
to
cbee158
Compare
window.subscribe(); | ||
}).to.throw(Rx.ObjectUnsubscribedError); | ||
}, late); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this test went away. Can you elaborate? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blesh now that window's internal Subjects aren't being tracked as if they were Subscriptions, their unsubscribe
method is never called when the subscriber disposes. This test attempts to subscribe to one of the window Subjects after the outer window subscription has been disposed, assuming the WindowSubscriber
has called unsubscribe
on the Subject. This PR invalidates that assumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks
cbee158
to
f3357b9
Compare
@Blesh #1705 resolves #1669 and partially fixed #1698, after which I discovered an unrelated race condition. The window operators would continue to Observable.range(0, 2)
.windowCount(1).mergeAll()
.take(1).subscribe(); |
Looks good to me, @trxcllnt. |
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. |
Description:
This PR removes behavior in the window operators that tracked the window Subjects as Subscriptions. This could lead to race conditions where the Subscriber unsubscribes while the window operator is still active and attempting to send messages to the windows.
Related issue (if exists):
#1698