The Messenger of Allah ﷺ said, "When Satan hears the call to prayer, he turns and flees, breaking wind as he goes. Once the muezzin falls silent, he returns and slips between a person and his heart to make him forget his prayer. So when one of you is uncertain about his prayer, let him conclude with the salaam, then perform two prostrations while seated."
حدثنا عبد الله حدثني حدثنا سريج قال حدثنا فليح عن سلمة بن صفوان بن سلمة الزرقي عن أبي سلمة
قال رسول الله ﷺ إن الشيطان إذا سمع النداء ولى وله حصاص فإذا سكت المؤذن أقبل حتى يخطر بين المرء وقلبه لينسيه صلاته فإذا شك أحدكم في صلاته فليسلم ثم ليسجد سجدتين وهو جالس