I believe it's a bit too much of a generalization. Sometimes we need to waste our time on people who don't contribute to us and recognize that it is sometimes our responsibility to contribute to others even if they don't return the favor.
However, it is absolutely true that at some point if you are hurting and the person is not receptive but only increasingly more bad for your life then it is time to walk away and devote your time to those who either contribute to your life positively or accept your positive contributions into their life. It takes wisdom to decide when to stay and when to walk away, to be sure, but that is a wisdom worth having. Always deciding to walk away when someone does not contribute to your life is the easy way out and does not even truly help you in the end. Better to seek out the wisdom to make the hard decisions than to use a blanket statement like this instead and miss out on opportunities, and obligations,To bless and be blessed by those you'd never expect. we need to find such inspirational people
This is very inspiring and hopeful Quote.