Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates: We used to greet the Messenger of Allah (peace and blessings be upon him) with salam while he (peace and blessings be upon him) was in prayer, and he would return our salam. When we returned from the emigration to Abyssinia, I greeted the Messenger of Allah (peace and blessings be upon him) with salam, but he (peace and blessings be upon him) did not reply. So I said: O Messenger of Allah (peace and blessings be upon him), you used to return the salam; why are you not doing so now? He (peace and blessings be upon him) said: "The prayer is an occupation in itself."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3902