It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that before the migration to Abyssinia, we used to greet the Messenger of Allah (peace and blessings be upon him) with salam while he was in prayer, and he (peace be upon him) would reply to us while still in prayer. When we returned from Abyssinia, I came to the service of the Messenger (peace be upon him) to greet him with salam. I found him in prayer, greeted him with salam, but did not receive a reply. Various thoughts came to my mind, so I sat down until he (peace be upon him) completed the prayer. Then I came to him, and he (peace be upon him) said: "Allah issues new commands in His religion as He wills. Allah Almighty has now given the command that there should be no conversation during prayer."
Hadith Referenceالسنن المأثورة / باب ما جاء في صلاة الخوف / 63