Sayyiduna Ibn Mas'ud (may Allah be pleased with him) narrates that I used to greet the Prophet (peace and blessings be upon him) with salam during prayer and he would respond to me. But one day I greeted him with salam and he did not respond. I felt great distress because of this. When the Prophet (peace and blessings be upon him) finished the prayer, I said: O Messenger of Allah (peace and blessings be upon him)! Previously, when I greeted you during prayer, you would respond to me? He replied: "Allah the Exalted sends new commands in His matters as He wills."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 3944
Hadith Gradingحکم دارالسلام:حديث صحيح، وهذا إسناد حسن فى المتابعات.