WebSocket refusing to connect (1006)

HTTP error 500, WS error 1006
Server code:
const pair = new WebSocketPair();
const [client, server] = Object.values(pair);
this.ctx.acceptWebSocket(server);
this.clients.push(client);

Dashboard shows You must call one of accept() or state.acceptWebSocket() on this WebSocket before sending messages. (i called that method)
Client implementation works, tested with wrangler/another websocket server
image.png
Was this page helpful?