Closed domesticmouse closed 2 years ago
Same error
Uncaught (in promise) DOMException: Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1001 is neither.
This looks like it's coming from the browser. AFAICT the code 1001
is not intended to be used by your code - I think it's a code reserved for the browser to use?
Instead of status.goingAway
choose status.normalClosure
, or as the message indicates you can use some number between 3000
and 4999
.
Code that causes the issue:
Stack trace: