Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said: "When the Imam says salam, then you should say salam to the right and to the left, and after that, do not turn to any part of your prayer."
Hadith Referenceسنن الدارقطني / كتاب الصلاة / 1497
Hadith Takhrij«أخرجه الدارقطني فى ((سننه)) برقم: 1496، انفرد به المصنف من هذا الطريق»