“The Prophet ﷺ sent me on an errand, then I caught up with him while he was performing prayer, and I greeted him. He gestured to me, then when he finished, he called me and said: ‘You greeted me before, but I was performing prayer.’” (Using translation from Ibn Mājah 1018)
كَانَ رَسُولُ اللهِ ﷺ بَعَثَنِي لِحَاجَةٍ ثُمَّ أَدْرَكْتُهُ فَسَلَّمْتُ عَلَيْهِ فَأَشَارَ إِلَيَّ فَلَمَّا فَرَغَ دَعَانِي فَقَالَ إِنَّكَ سَلَّمْتَ عَلَيَّ آنِفًا وَأَنَا أُصَلِّي وَهُوَ مُوَجِّهٌ حِينَئِذٍ قِبَلَ الْمَشْرِقِ