What do you mean by "risks"? There are no risks if you don't have bugs....
You should make sure that you reconnect the websocket if it disconnects. On reconnect, make sure that the server correctly updates the state or session for the client so that your client receives the result even though there were interruptions. Store the result in the state on the server if the client is not connected and send the result on reconnect.
By the way, there is a difference between JavaScript and Java Script. I think, you meant the former... (or to quote someone's profile message: "Java is the same to JavaScript as car is to carpet"^^)