How did I??

Get an STI if we used a condom? I always use a condom. He didn’t know he had it. We’re FWB and hadn’t hooked up in a while due to him being gone. We had sex and two days later I had symptoms. Got checked and we’re both being treated. But it said you contract it during unprotected sex. The condom didn’t break or anything. So I’m confused. I know they’re not 100%. Has this happened to anyone else