(help) advice

Does he have the right to be mad ?

Me and my ex we were having sex together now and again when he comes to see me , but at the same time he told me he does not want to be with me because he does not know , and now he found Out i was having sex with this boy and i dont talk to that boy anymore as i told him im trying to work things out with my ex , so my point is does he have the right to be as me and him werent together ?