How to know when to let a friend go or give them a second chance?

If a friend did something wrong to you, how do you know when to forgive and move on together or forgive and drift apart?