Abu Hurayra reported that the Prophet, may Allah bless him and
grant him peace, said, "When a man comes to a gathering, he should give
the greeting. When he sits down and then thinks that he should leave before
the gathering has broken up, he should give the greeting. Neither is more
of a duty than the other."