There’s an old saying, “Feed a cold, starve a fever.” But according to a recent study in the journal Cell, it might be more accurate to say, "Feed a viral infection, starve a bacterial infection." That is, when you’re sick with a bacterial infection, fasting may be more effective than feasting, while viral infections may be alleviated by reaching for some chicken soup.

New Scientist reports that researchers at Yale wanted to determine the impact food has on illness recovery, so they rounded up a group of lab mice for some tests. They infected some mice with inflammation-triggering molecules from bacteria, and others with inflammation-triggering molecules from viruses. Then, they observed the effects of food (in this case, sugar glucose) on mouse recovery. They found that for mice with viral inflammation responses, consumption of glucose helped speed recovery. For mice with bacterial inflammation responses, however, glucose wasn’t just ineffective—it actually made them sicker, triggering seizures and even death.

Researchers believe glucose helped protect the brain cells of mice with viral infections from inflammation. In the case of bacterially infected mice, however, glucose digestion generated free radicals that ended up damaging neurons within the brain. Meanwhile, chemicals called ketones, produced by the bodies of fasting, bacteria-infected mice, seemed to protect these mice against neuronal damage.

Researchers still need to conduct more research to determine the exact implications of the study for humans. The next step, lead researcher Ruslan Medzhitov says, is to study the effects of eating or fasting on patients with sepsis (a complication of an infection that can cause organ failure). But for now, Medzhitov claims, it’s a good idea to listen to your body when you get sick: If you’re feeling feverish and famished, it’s likely you have a viral infection and should eat. But if you’re sick and lack an appetite, you may have a bacterial infection and might want to cut down on your food intake. As Medzhitov explains, “We think during illness one changes food preferences to support the appropriate metabolic program.”

[h/t New Scientist]