Auto-reconnect to environment if websocket closes