Abu Hurairah reported,

The Prophet ﷺ said, "A servant remains in a state of prayer as long as he is in the mosque waiting for the prayer, so long as he does not break his ablution."A non-Arab man asked, "Abu Hurayrah, what does breaking ablution mean?"He replied, "The sound," meaning passing wind.In another wording, "The prayer of any one of you is not accepted if he breaks his ablution until he performs ablution again."

Azami 1668

Sahih

عن أبي هريرة قال

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

الأعظمي 1668صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Wudu
Section
Breaking wudu due to the emission of sound from the rear
Numbering
Jami al-Kamil 1668 (2nd edition)
Azami 1668