Sahih Muslim, Book 3, Hadith 144 (Muslim 818)

Ibn Umar reported:

A person happened to pass by the Messenger of Allah (ﷺ) when he was making water and saluted him, but he did not respond to his salutation.