-
Notifications
You must be signed in to change notification settings - Fork 118
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
Rxjs and Error on unsubscribe -> CloseEvent has to be wasClean = true #287
Comments
I've looked into this issue and it's because the This is tough to fix as this project doesn't seem to be actively maintained, although it's really a 1 liner... To be fair to everyone the webstandard is extremely vague as to the definition of wasClean. |
Use default codes for close event (#287)
Fixed in |
Thanks for fixing. I would have happily made a PR after doing the analysis but wasn't convinced PRs were getting merged! |
I have a really simple stackblitz to reproduce issue:
https://stackblitz.com/edit/rxjs-qxerxt
You could see that we have two different rxjs tests, The first one we unsubscribe from WebSocket but we just receive a CloseEvent error with code = 0 and wasClean = false.
On the second example, we just don't unsubscribe from rxjs WebSocket subject so jasmine just goes in timeout error.
What i have to say that the test just works correctly on real WebSocket server, so we just receive errors using your library.
Secondly using a classic approach based on MockWebSocket everything is correct. See: https://github.com/ReactiveX/rxjs/blob/master/spec/observables/dom/webSocket-spec.ts#L711
Do I miss something? Why there is no clean close when client just closes connection?
The text was updated successfully, but these errors were encountered: