It is narrated from Sayyiduna al-Muhajir bin Qunfudh (may Allah be pleased with him) that he greeted the Messenger of Allah (peace and blessings be upon him) with salam while he (peace and blessings be upon him) was performing ablution, and he (peace and blessings be upon him) did not return his greeting. When he finished his ablution, he (peace and blessings be upon him) said: "Nothing prevented me from returning your greeting except that I disliked remembering Allah without ablution."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 426