This quote is saying that if you are going through a difficult time with a friend, you should think about how important this friendship is to you. If the person is not being a good friend to you (for example, by not treating you with respect or kindness), it might be best to end the friendship.