When the websocket connection is lost, try to connect again. When the connection the resolves, send your scene.