Vaginal infection early pregnancy

So ladies I went to the first doctors appointment yesterday. Well today i receive a call letting me know that I have a vaginal infection. Of course I'm like WTF?!?!?! They've prescribed medication I should be getting later on today. Well my dilemma is I googles this crap and it states that it can cause miscarriage and or preterm labor. Now I'm just worried. Have any of you all been through this??? TIA