Jabir bin Samurah (may Allah be pleased with him) relates: I prayed with the Messenger of Allah (peace and blessings be upon him). When we gave the salam, we would also gesture with our hands and say: 'As-salamu alaykum, as-salamu alaykum' (Peace be upon you, peace be upon you). The Messenger of Allah (peace and blessings be upon him) looked at us and said: "What is the matter with you that you are gesturing with your hands like the tails of restive horses? When one of you gives the salam, he should turn slightly towards his companion and not gesture with his hand."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2997