Sprung shoe when riding question

My horse sprung a shoe while I was riding him a few days ago and one of the nails went right into the sole of his foot. Fortunately, the farrier happened to be visiting my neighbour and so he was able to remove the shoe. But I'd like to know, if this happens again, should …