Depends on how serious it is, situation, circumstances, and what is threatened.
To me, the question is too vague.
..consistently flirting with your wife/girlfriend and you are in a long distance relationship.
Talk to your gf/wife. Everything else based on how she takes it.