Added small fix for disconnecting websocket that somehow didn't set its readyState appropriately.