If there is an opportunity of enjoining good and forbidding wrong (Amr bil Maroof & Nahi Anil Munkar), it is incumbent upon you to do your duty, but if there is no efficacy in doing so, you are expected to restrict your relationship with such people but cutting and abandoning family Ties or “Silat-ur-Rahim” is not advisable.
“Silat-ur-Rahim” which means maintaining the bond of kinship and visiting relatives is of the moral teachings. Islam has emphasized on “Silat-ur-Rahim” and the Holy Quran has counted those who abandon “Silat-ur-Rahim” among the losers and the cursed ones. Moreover, in the narrations, “Silat-ur-Rahim” has been introduced as the best practice after faith and the best characteristic and the most important factor in prolonging life. According to a Hadith Qudsi, “Silat-ur-Rahim” is Allah's mercy and whoever abandons it will be deprived of his mercy.
source : erfan.ir