while (rv >= 0); // taking into account break is called on exit event