-
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
ReplaySubject subscription handler is called before it is subscribed #2044
Labels
bug
Confirmed bug
Comments
jayphelps
pushed a commit
that referenced
this issue
Oct 24, 2016
…tion function (#2046) Removed reliance on inherited `_subscribe` method from `Subject`. ReplaySubject has different behaviors during subscription for notifying new subscribers after a completion or error. After moving the `super._subscribe` call before the notification from saved `_events`, it was apparent that the inherited behavior from `Subject` was stopping the subscriber before it could be notified properly. fixes #2044
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
RxJS version:
rxjs@5.0.0-rc.1
Code to reproduce:
Expected behavior:
Output: 1, 2, 3
Actual behavior:
Output: 1
Additional information:
This works properly in RxJS v4
It seems that the issue comes from this code: https://github.com/ReactiveX/rxjs/blob/master/src/ReplaySubject.ts#L40
Where we first call the subsrcibe handler with the previous values, before we actually subscribe him for
next
values.The text was updated successfully, but these errors were encountered: