Jailbroken iPhone 5 erased by find phone

The phone was jailbroken and was attempted to erase by find my phone. It never erases and it when you reboot it just keeps trying to erase. Is there anything I can do or am I screwed
Restore the iPhone 5 in iTunes
It can't be restored because it keeps trying to erase it even when I reboot
because it keeps trying to erase it even when I reboot
Ok I figured it out. Since I used Find IPhone app to erase the phone that was jailbroken it keep erasing during reboot holding the lock and home button together. I did this again but held the home button this time. I then plugged into computer and iTunes still holding the home button and was able to run the restore. And then it was erased.

Original thread: https://forums.imore.com/threads/jailbroken-iphone-5-erased-by-find-phone.347617/