Asshole guy but did I do the right thing ?

Last night before I went to the club with my friends I decided to see this guy I been talking to and having sex with for a while now and when I got to his house everything went great we had sex we cuddled we talked like we do everytime etc so he also had plans with his friends to so we ended up with a little amount of time to get it in but it was like once his friends started knocking on the door he switched on me like telling me to hurry up and leave smoking in front of my face with them laughing not touching me or even being next to me I couldn't believe this ass then me waiting on my friends to get me since we were only going to ride in one car he decides to call them being disrepectful yelling calling them out there names telling them to hurry up I couldn't believe it so I immediately walked out his house not knowing where I was going crying he told me not to leave and called me so I just blocked his number eventually my friends found me we went out had drinks I met new people and had I great time but it's just crazy how you think you know a person and y'all have a understanding and in a instant they switch on you and don't give a fuck about you