The Messenger of Allah ﷺ would fast continuously until people said he never broke his fast, and he would go without fasting until people said he never fasted.
أخبرنا أحمد بن سليمان قال حدثنا زيد بن الحباب قال أخبرني ثابت بن قيس الغفاري قال حدثني أبو سعيد المقبري قال حدثني أبو هريرة
أن رسول الله ﷺ كان يسرد الصوم فيقال لا يفطر ويفطر فيقال لا يصوم
No references are available.
[Its isnad is hasan]. It is in Kubra, hadith no. 2668, and see the two preceding hadiths.