Avoid sex until the yeast infection is better—usually, a few days after you’ve finished treatment and your symptoms have gone away. Taking part in sexual activity while you have a yeast infection can make the symptoms last longer. It’s also likely that having sex with a yeast infection will be irritating and uncomfortable.