Mishkat al-Masabih 979
وَعَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: كُنَّا نُسَلِّمُ عَلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَهُوَ فِي الصَّلَاةِ فَيَرُدُّ عَلَيْنَا فَلَمَّا رَجَعْنَا مِنْ عِنْدِ النَّجَاشِيِّ سَلَّمْنَا عَلَيْهِ فَلَمْ يَرُدَّ عَلَيْنَا فَقُلْنَا: يَا رَسُولَ اللَّهِ كُنَّا نُسَلِّمُ عَلَيْكَ فِي الصَّلَاةِ فَتَرُدُّ عَلَيْنَا فَقَالَ: إِنَّ فِي الصَّلَاةِ لَشُغْلًا
From ʿAbdullah ibn Masʿud, who said: We used to greet the Prophet ﷺ with salam while he was in prayer, and he would return it to us. When we returned from the Najashi, we greeted him and he did not return it to us. We said: "O Messenger of Allah, we used to greet you in prayer and you would return it to us." He said: "In prayer there is indeed an occupation."