Closed estelle0500 closed 5 years ago
Looking at the code in the websocket plugin this definitely seems to be an issue. @ngxs/core As part of fixing this we need to get the websocket tests working, reproduce the error and fix it.
@estelle0500
I've published a PR that fixes that issue. Would you like to help me with your regression feedback if everything is ok or not? So we're able to add that fix to the 3.5.0
release.
P.S. I will notify you when this PR gets merged
@estelle0500
The PR was merged. You can try it out by running:
yarn upgrade @ngxs/websocket-plugin@dev
The latest dev
version is 3.4.3-dev.master-dad8ead
Released in 3.5.0
I'm submitting a...
Current behavior
Trying to use the WebSocket plugin to connect with my server. Once a
WebSocketDisconnected
action happens, theWebSocketSubject
produces an error. Even if I try to reconnect by dispatching aConnectWebSocket
action afterwards, no more data comes through the subscription toWebSocketSubject
as the stream has been killed.Expected behavior
After reconnecting, the
WebSocketSubject
should continue to emit data sent from the server.Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
The connection with the server may not be stable and I don't want to force the user to refresh the page (which would regenerate everything, including creating a new
WebSocketSubject
) to be able to see the new changes.Environment