The Messenger of Allah ﷺ said, "Each of you remains in prayer as long as he is waiting for it, and the angels keep praying for each of you as long as he is in the mosque, saying, 'Allah, forgive him. Allah, have mercy on him,' so long as he does not break his ablution."A man from Hadramawt asked, "What does breaking ablution mean, Abu Hurayrah?"He replied, "Passing wind, silently or audibly."
حدثنا محمود بن غيلان حدثنا عبد الرزاق أخبرنا معمر عن همام بن منبه
قال رسول الله ﷺ لا يزال أحدكم في صلاة ما دام ينتظرها ولا تزال الملائكة تصلي على أحدكم ما دام في المسجد اللهم اغفر له اللهم ارحمه ما لم يحدث فقال رجل من حضرموت وما الحدث يا أبا هريرة قال فساء أو ضراط
Agreed upon by Bukhari and Muslim. Muslim narrated it in the Book of Mosques, chapter on the merit of performing the obligatory prayer in congregation, etc., hadith no. 649, after hadith no. 661, from the report of Abdul-Razzaq. Bukhari narrated it, hadith no. 647, from the report of Abu Hurairah through this chain. The hadith is also found in the Sahifah of Hammam bin Munabbih, hadith no. 131, in abbreviated form with slight variation, though the meaning is the same.On this subject there are also reports from Ali [Abu Yaala 1/379, hadith no. 488, and Bazzar, hadith no. 447, and Hakim graded it sahih 1/132, and Dhahabi agreed with him], from Abu Saeed [Abu Dawud, hadith no. 422, Ibn Majah, hadith no. 693], from Anas [Bukhari, hadith no. 661, and Muslim, hadith no. 640], from Abdullah bin Masud [Tabarani in Al-Kabir 10/273, hadith no. 10532], and from Sahl bin Saad [Nasai, hadith no. 735].