I asked the Messenger of Allah ﷺ about an unintended glance, and he commanded me to turn my gaze away.
حدثنا أحمد بن منيع حدثنا هشيم أخبرنا يونس بن عبيد عن عمرو بن سعيد عن أبي زرعة بن عمرو بن جرير
سألت رسول الله ﷺ عن نظرة الفجاءة فأمرني أن أصرف بصري
Muslim also narrated it in the chapter on adab, the section on the sudden glance, hadith no. 2159, from the hadith of Hushaym, through this route.