sendRawMessage() in graphql.service.ts calls socket.send() without checking socket.readyState, causing Failed to execute 'send' on 'WebSocket': Still in CONNECTING state errors.
Race conditions:
Ping interval only checks if (this.socket), not readyState === OPEN
Three independent reconnection triggers (onclose, ping timeout, offline event) can overlap
Re-subscription loop after connection_ack can throw if socket transitions mid-loop
Fix: Add readyState === WebSocket.OPEN guard in sendRawMessage(). Optionally add message queueing and connection locking for robustness.
Same as #740
sendRawMessage() in graphql.service.ts calls socket.send() without checking socket.readyState, causing Failed to execute 'send' on 'WebSocket': Still in CONNECTING state errors.
Race conditions:
Ping interval only checks if (this.socket), not readyState === OPEN
Three independent reconnection triggers (onclose, ping timeout, offline event) can overlap
Re-subscription loop after connection_ack can throw if socket transitions mid-loop
Fix: Add readyState === WebSocket.OPEN guard in sendRawMessage(). Optionally add message queueing and connection locking for robustness.
Same as #740