“We would greet others during the prayer, and it was said to us: ‘During the prayer one is preoccupied.’”

Sunan Ibn Majah Book 5, Hadith 217