It is narrated from Sayyiduna Muhajir bin Qunfudh (may Allah be pleased with him) that he greeted the Prophet (peace and blessings be upon him) with salam while he was urinating, and he (peace and blessings be upon him) did not return his greeting until he had performed ablution.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17911