Yeast infection

Should I have sex if I have a yeast infection or will that make it worse?