The Messenger of Allah (ﷺ) used to observe two rak'ahs of Sunnah (prayer) when he heard the Adhin and shortened them.
Sahih Muslim Book 6, Hadith 111