From Sahih Bukhari (Hadith 5667):
Narrated Ibn Mas`ud:I visited the Prophet (ﷺ) while he was having a high fever. I touched him an said, "You have a very high fever" He said, "Yes, as much fever as two me of you may have." I said. "you will have a double reward?" He said, "Yes No Muslim is afflicted with hurt caused by disease or some other inconvenience, but that Allah will remove his sins as a tree sheds its leaves
Reference: Bukhari 5667