Reference: Siyar A’laam an-Nubalaa – Volume 12, Page 391
Muhammad ibn Abee Haatim said:
Muhammad ibn Ismaa’eel [al-Bukhaaree] was invited to a garden belonging to some of his friends. [Later], after he had prayed the Zhuhr [prayer] with them, he then began to pray voluntary (nawaafil) prayers. When he had finished, he raised the bottom of his shirt and asked some of those around him to have a look to see if there was anything under his shirt.
[What had actually happened was that] hornets had bitten him in 16 or 17 different places, and his body had become swollen as a result of that; some of those around him said [to him]: ‘How is it you didn’t break your prayer when you were first stung?’
And he responded: ‘I was reciting a soorah, and really wanted to complete [reciting] it.’