The Messenger of Allah ﷺ prayed one day and gave the closing salam after only two units, then he turned away. Dhul-Shimalayn caught up with him and said, "Messenger of Allah, has the prayer been shortened, or did you forget?"He replied, "The prayer has not been shortened, nor did I forget."Dhul-Shimalayn said, "Yes indeed, by the One who sent you with the truth."The Messenger of Allah ﷺ asked, "Has Dhul-Yadayn spoken truthfully?"They answered, "Yes."So he led the people in two more units of prayer.
أخبرنا عيسى بن حماد قال حدثنا الليث عن يزيد بن أبي حبيب عن عمران بن أبي أنس عن أبي سلمة
أن رسول الله ﷺ صلى يوما فسلم في ركعتين ثم انصرف فأدركه ذو الشمالين فقال يا رسول الله أنقصت الصلاة أم نسيت فقال لم تنقص الصلاة ولم أنس قال بلى والذي بعثك بالحق قال رسول الله ﷺ أصدق ذو اليدين قالوا نعم فصلى بالناس ركعتين
[Its chain is sahih] Ibn Abu Shayba: 2/37 and Tahawi in Maani al-Athar: 1/445 narrated it from the hadith of Layth bin Saad, with the same chain, and it is also in al-Kubra, hadith 561 and 1151.