I keep seeing this error:
if (this.readyState != WebSocket.OPEN) throw new Error('not opened');
Error: not opened
at WebSocket.pong (/home/deploy/node_modules/ws/lib/WebSocket.js:153:48)
at Receiver.<anonymous> (/home/deploy/node_modules/ws/lib/WebSocket.js:539:10)
at Receiver.emit (events.js:70:17)
at Receiver.<anonymous> (/home/deploy/node_modules/ws/lib/Receiver.js:523:12)
at Receiver.expectData (/home/deploy/node_modules/ws/lib/Receiver.js:129:5)
at Receiver.<anonymous> (/home/deploy/node_modules/ws/lib/Receiver.js:517:14)
at Receiver.<anonymous> (/home/deploy/node_modules/ws/lib/Receiver.js:500:30)
at Receiver.<anonymous> (/home/deploy/node_modules/ws/lib/Receiver.js:193:19)
at Receiver.add (/home/deploy/node_modules/ws/lib/Receiver.js:93:24)
Do you happen to have a ping on an interval?
@einaros, No, my code doesn't call either ping or pong. (Obviously the server that I'm connecting to does.)
Rater rude of the server to ping you and then disconnect. But point taken, I'll mask the error from automated pongs.
I think the connection was closed on my side.
allow #ping and #pong to fail silently for already closed connections…
…. fixes #30