You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to debug a weird intermittent issue where the client sometimes is not able to create/connect to the websocket.
I have a simple setup:
const ws = new Client(`ws://${vsUri}`, {max_reconnects: 0})
ws.on('open', () => {
console.log('its open')
})
ws.on('error', (e) => console.log(e)) // never called
Problem is, sometimes the 'open' is never called. I managed to monkeypatch into the rpc-websockets source code to gather more info, and I found out that ws.socket stays in the following state:
And it stays forever that way. The only thing I see relevant is the _closeCode: 1006 field. Now I'm stuck. What can I do? Shouldn't rpc-websockets handle this error?
Just a reminder: sometimes I do get a successful connection, I just don't understand why the Client doesn't keep trying to reconnect in this case.
The text was updated successfully, but these errors were encountered:
I'm trying to debug a weird intermittent issue where the client sometimes is not able to create/connect to the websocket.
I have a simple setup:
Problem is, sometimes the 'open' is never called. I managed to monkeypatch into the
rpc-websockets
source code to gather more info, and I found out thatws.socket
stays in the following state:And it stays forever that way. The only thing I see relevant is the
_closeCode: 1006
field. Now I'm stuck. What can I do? Shouldn'trpc-websockets
handle this error?Just a reminder: sometimes I do get a successful connection, I just don't understand why the Client doesn't keep trying to reconnect in this case.
The text was updated successfully, but these errors were encountered: