I have a site using websockets secure (WSS) and works very well in chrome.
Testing in IE and Edge also works however in the browser console I get Network Error 12152
which will also trigger the websocket.addEventListener("error",function(){})
if implemented.
Everything actually works I just get this error which doesnt seem to break anything.
Error is triggered When socket is closed from Browser Side
More Info: Example of the code I use
//connect via wss then
ws.addEventListener("error",function(event){ // this hits when Socket is closed})
ws.addEventListener("open",function(){
ws.addEventListener("message",function(event){
//do stuff
ws.Close()
})
})
To Confirm the problem further
I went to https://www.websocket.org/echo.html in edge the site which has the ability to test websocket connections. I made it connect to my server. which opens the connection without a problem. However in just the same way I have been getting problems with my code. This site also throws an error when I click the disconnect button. See Image Below. Is this a bug in IE/Edge?
My Server isnt disconnecting correctly? I use the above site with the default destination (Their websocket server) and not mine. There are no errors. But when connecting to mine on disconnect there are errors.
What could be the problem?
Thanks