Closing WebSocket connection in JavaScript - 1006 error code everytime
<p>Why does my WebSocket connection always closes with 1006 error code, even when I use .close(1000) or .close(3000).</p>

<p>Interestingly, when using the WebSockets connection with Express.js and Express-ws, this does not happen, only when using our real API. Could it be something the server does? Isn't 1006 local only though?</p>

<p>Any help would be appreciated.</p>

<p>Thanks</p>