I usually just keep smoking weed when I'm ill and sometimes its fine, other times its a bad idea. I figured out the main point for me is 'do I have a bad cough or do I not have a cough', if the illness comes with a severe cough, like the mexican flu I had half a year ago then smoking weed will make it worse; smoking a joint made my coughing taste like thin blood and my lungs hurt. More recently I had a troath infection that came with a high fever but no cough at all and smoking weed during that seemed to be fine; was better from that in 3 days as well completely (mexican flu also only lasted 4 days by the way, I eat a lot of vitamins every day and drink a lot of water, and my health is generally good except for how much I torture my poor sweet lungs).
Either way: If you're coughing (badly): Don't smoke; it'll make your coughing taste like blood, hurt and if your health isn't good you might even cause yourself pneunomia or something like that.
If you're not coughing and taking good care of yourself other wise you can always try and see how it makes you feel.