Should you train when you’re sick?

How sick is too sick for a workout? What does training do to help boost your immune system?