Was I right to take a break?

I have been dating this guy for 5 months now and when I started dating him I told him I wanted something serious that I didn’t want to play any games. He agreed and told me he felt the same We were good up until this last month he started acting distant and weird so I asked him what was up and he said that someone from his past just randomly started talking to him again and he was just confused. I didn’t really think much about it but then I told my best friend about me being confused cause he felt confused then she asked me if the friend was a girl or boy and I don’t know why but I never thought to ask him that and when I did he took a long pause to tell me that yes it was a girl.. I didn’t really care cause I’m not big into “hey don’t talk to the opposite cause I’ll get jealous” but the way he was acting about her talking to him made me jealous. Then I come to find out it’s not just a regular friend that he hasn’t talked to since high school it’s his ex childhood best friend/girlfriend who he has been hung up on for the past three years. Tonight I just found out that since she started talking to him they kept talking routinely he also told me that he knew what he was doing was wrong and that he told her he had to stop talking to her cause he wanted to move forward with me. I asked him if he always felt so strongly about her then why did he want to go out with me and he told me that when we started dating he was confused and trying to figure things out but now he’s not and I am.. I told him I needed a break because having to drag the truth out of him just hurt as much as him admitting to not having been 100% in the relationship till now.