einaros/ws — Issue #32: Socket.io 0.9.0 + WebSocket.prototype.close
Author: mendelbenjamin
Created: 2012-02-27 07:02:08+00:00
State: open

I'm running socket.io 0.9.0 that's currently shipping with ws 0.4.0, but I've tested it with ws 0.4.7 too. I'm running socket.io-client (0.9.0) on the server side and sometimes the client disconnects (not sure why but that's not the problem here), when it does the socket.io-client service crashed with the following error:

ws 0.4.0:
/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js:215
if (this._state != 'connected') throw new Error('not connected');

ws 0.4.7:
/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js:104
if (this.readyState != WebSocket.OPEN) throw new Error('not opened');

It's not that big of a problem because forever will restart the service and it will reconnect to my socket.io server, but just a heads up..