A man passed by the Prophet (sal Allaahu alayhi wa sallam ) while he was urinating, and saluted him. The Prophet (sal Allaahu alayhi wa sallam) did not return the salutation to him. Abu Dawud said : It is narrated on the authority of Ibn 'Umar that the Prophet (sal Allaahu alayhi wa sallam) performed tayammum, then he returned the salutation to the man.
مَرَّ رَجُلٌ عَلَى النَّبِيِّ ﷺ وَهُوَ يَبُولُ فَسَلَّمَ عَلَيْهِ فَلَمْ يَرُدَّ عَلَيْهِ