-
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
WebSocketSubject cannot be retried. #1466
Comments
I'm going to have a stab at this, I think I've identified the cause, but I'll write a failing test case to isolate it. |
Relates to ReactiveX#1466 Each time a multiplex subject unsubscribes, it sends the `unsub` message to announce this to the server. If, however, the underlying socket closes, the multiplex subject still tries to send it's `unsub` message over an already unsubscribed subject which throws an `UnsubscriptionError`
I created a failing test case and a fix: When I apply the fix to my own test environment it solves the problem, but the test still fails for some reason. Any ideas? The problem is each time a multiplex subject unsubscribes, it sends the The current fix check's the underlying socket's ready state with |
It works since 5.0.0.beta.8, but there is no test which ensures this for the future. related ReactiveX#1466
It works since 5.0.0.beta.8, but there is no test which ensures this for the future. + fixed tslint errors related ReactiveX#1466
It looks, that the bug does no longer exists since beta 8. See added test in PR 1738 above. |
@skaapgif did you already PR your fix and test for the unsub message? |
* test(WebSocketSubject): add test for multiplex in combination with retry It works since 5.0.0.beta.8, but there is no test which ensures this for the future. related #1466 * test(WebSocketSubject): add test for multiplex in combination with retry It works since 5.0.0.beta.8, but there is no test which ensures this for the future. + fixed tslint errors related #1466
Closed by #1738 |
I was still awaiting feedback, but @fs123's test is very similar and more thorough. I was able to reproduce the error without calling |
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. |
RxJS version: 5.0.0-beta.2
Code to reproduce:
Expected behavior:
connection fails and then retries once a second.
Actual behavior:
connection fails and then
UnsubscriptionError
is thrown, subsequent subscriptions do not workAdditional information:
This apparently has to do with some changes to Subject and unsubscription error handling. I'm not sure though. We should definitely add some tests around this scenario, because it's important. WebSocketSubject was supposed to be reusable.
I found this will trying out the
multiplex
method in production for the first time. :\ Bummer.The text was updated successfully, but these errors were encountered: