A man passed by the Prophet ﷺ while he was urinating and greeted him with salaam, but he did not return the greeting .
أخبرنا محمود بن غيلان حدثنا زيد بن الحباب وقبيصة قالا أنبأنا سفيان عن الضحاك بن عثمان عن نافع
مر رجل على النبي ﷺ وهو يبول فسلم عليه فلم يرد عليه السلام
Muslim also narrated it, in the Book of Menstruation, Chapter on Tayammum, hadith (370), through the hadith of Sufyan Thawri, with the same chain.