It is narrated from Sayyiduna Mu'adh bin Anas al-Juhani (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "It is a duty upon whoever gets up from a gathering to give them the greeting of peace, and it is also a duty upon whoever comes to a gathering to give the greeting of peace." Just then a man got up while the Messenger of Allah (peace and blessings be upon him) was speaking, and he did not give the greeting of peace. So the Messenger of Allah (peace and blessings be upon him) said: "How quickly he has forgotten!"
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17543