Abdullah bin Masud reported,

We used to greet the Messenger of Allah ﷺ with the salam while he was praying, and he would return our greeting. But when we returned from our journey to the Negus, we greeted him and he did not return our greeting. He said, "Prayer demands one's full attention."

Abu Dawud 923

Sahih

حدثنا محمد بن عبد الله بن نمير حدثنا ابن فضيل عن الأعمش عن إبراهيم عن علقمة

عن عبد الله قال

كنا نسلم على رسول الله ﷺ وهو في الصلاة فيرد علينا فلما رجعنا من عند النجاشي سلمنا عليه فلم يرد علينا وقال إن في الصلاة لشغلا

أبو داود 923صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
Returning the greeting during prayer
Numbering
Darussalam 923
Abu Dawud 923