If I truly loved and had faith in the relationship, I'd stay. (Then again, my Sir and I were online for 3 years before we met.) If I needed something more immediate and was able to walk away, only to later discover I'd walked away from love, that would be something I'd have to live with.
However, here's something to keep in mind: There are a million scenarios that fit into the question you've asked. It's not as simple as that. Life has shades of gray, and mitigating circumstances and needs, wants, desires, hormones, what-ifs and maybes. Sometimes people do stupid, hurtful things, and sometimes we're the ones doing those stupid, hurtful things to others.
Everyone lives with the consequences of their own actions. Make your choices with compassion and integrity, and learn from your mistakes. Hope that, in this scenario, the outcome is ultimately positive. Learn from the mistakes of others. Understand that not all choices made are about you, even ones that are intimately linked to you.
Finally, love is not a once in a lifetime thing. It's romantic to think so, at the time, but as long as you seek it out, love will visit and revisit you in many forms.
Be well and have hope!