Abu Hurairah reported,

The Prophet ﷺ said, "The servant's supplication continues to be answered as long as he does not pray for something sinful or for the severing of family ties, and as long as he does not become impatient."Someone asked, "Messenger of Allah, what is impatience?"He replied, "It is when he says, 'I have prayed and prayed, but I do not see any response,' so he grows weary and abandons supplication."

Azami 10920

Sahih

عن أبي هريرة

عن النبي ﷺ أنه قال: لا يزال يستجاب للعبد ما لم يدع بإثم أو قطيعة رحم ما لم يستعجل. قيل: يا رسول الله ما الاستعجال؟ قال: يقول: قد دعوت وقد دعوت فلم أر يستجيب لي فيستحسر عند ذلك ويدع الدعاء.

الأعظمي 10920صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Rulings on supplication
Section
Supplication of the Muslim is answered as long as he does not hasten the response, or supplicate for sin, or severing ties of kinship
Numbering
Jami al-Kamil 10920 (2nd edition)
Azami 10920