I came to the Prophet ﷺ while he was performing ablution. I greeted him with salam, but he did not return the greeting. When he finished his ablution, he said, "Nothing prevented me from returning your greeting except that I was not in a state of ablution."Abu al-Hasan bin Salama said, Abu Hatim narrated to us, al-Ansari narrated to us from Saeed bin Abu Aruba, and he mentioned something similar.
حدثنا إسمعيل بن محمد الطلحي وأحمد بن سعيد الدارمي قالا حدثنا روح بن عبادة عن سعيد عن قتادة عن الحسن عن حضين بن المنذر بن الحارث بن وعلة أبي ساسان الرقاشي
أتيت النبي ﷺ وهو يتوضأ فسلمت عليه فلم يرد علي السلام فلما فرغ من وضوئه قال إنه لم يمنعني من أن أرد إليك إلا أني كنت على غير وضوء قال أبو الحسن بن سلمة حدثنا أبو حاتم حدثنا الأنصاري عن سعيد بن أبي عروبة فذكر نحوه
[Its chain of transmission is daif] Abu Dawud narrated it in Taharah, chapter on a man returning the greeting while urinating, no. 17. Hasan used "an" without specifying direct transmission, as noted previously, no. 17.