Yeah, common problem. If it happens again before you get it fixed, unplug one light from the system. Just reach behind either one and pull the plug. That way there is only half the load on the old switch and it should stay on long enough to get you home.
Better one light than no lights!!! Not real fun on a dark and twisty mountain road, eh?
A lot of us have upgraded to a more modern relay system to run the lights. Takes 90% of the load off the switch and at the same time puts more available power to the lights.
So not only are your same lights now brighter, but the switch doesn't complain anymore either.
Still time to replace the switch, but the pressure is off.
Paul